Diff

Differences From Artifact [780cdf7280]:

To Artifact [78e603f797]:


    13     13   fi
    14     14   
    15     15   VERS=1.6
    16     16   SRC="src/tls${VERS}-src.tar.gz"
    17     17   SRCURL="http://sourceforge.net/projects/tls/files/tls/${VERS}/tls${VERS}-src.tar.gz/download"
    18     18   BUILDDIR="tls${VERS}"
    19     19   WORKDIR="${TMPDIR:-/tmp}/tls-$$${RANDOM}${RANDOM}${RANDOM}"
           20  +PATCHDIR="$(pwd)/patches"
    20     21   PLATDIR="$(pwd)/out/${PLATFORM}"
    21     22   
    22         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR
           23  +export VERS SRC SRCURL BUILDDIR WORKDIR PATCHDIR PLATDIR
    23     24   
    24     25   if [ ! -f "${SRC}" ]; then
    25     26   	mkdir src >/dev/null 2>/dev/null
    26     27   
    27     28   	wget -O "${SRC}" "${SRCURL}" || exit 1
    28     29   fi
    29     30   
................................................................................
    30     31   (
    31     32   	rm -rf build
    32     33   	mkdir build
    33     34   	cd build/ || exit 1
    34     35   
    35     36   	gzip -dc "../${SRC}" | tar -xf -
    36     37   	cd "${BUILDDIR}" || exit 1
           38  +
           39  +	# Apply patches
           40  +	for patchfile in "${PATCHDIR}"/all/*.diff "${PATCHDIR}/${VERS}"/*.diff; do
           41  +		if [ ! -f "${patchfile}" ]; then
           42  +			continue
           43  +		fi
           44  +
           45  +		patch -p1 < "${patchfile}"
           46  +	done
    37     47   
    38     48   	for chkssldir in $(pkg-config openssl --cflags | sed 's@ *-I *@|@g' | tr '|' "\n" | grep '^/'); do
    39     49   		if [ -f "${chkssldir}/openssl/opensslv.h" -o -f "${chkssldir}/opensslv.h" ]; then
    40     50   			SSLDIR=$(echo "${chkssldir}" | sed 's@/[^/]*/*$@@')
    41     51   		fi
    42     52   	done
    43     53   	if [ -z "${SSLDIR}" ]; then