Check-in [a49ee9121f]
Overview
Comment:Added support for disabling "visibility=hidden" when building KitDLL
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a49ee9121fdd12551746089399777b1a12f32f6f
User & Date: rkeene on 2011-03-03 05:01:51
Other Links: manifest | tags
Context
2011-03-03
11:30
Updated to remove "pkgs" directory from Tcl when doing a minimal build check-in: b29659c9d1 user: rkeene tags: trunk
05:01
Added support for disabling "visibility=hidden" when building KitDLL check-in: a49ee9121f user: rkeene tags: trunk
04:09
Updated to support pulling Tcl and Tk from newest fossil sources. They are still likely to change in the future. check-in: f5886050c4 user: rkeene tags: trunk
Changes

Modified tcl/build.sh from [f95adb2a3c] to [49efe2ef77].

    67     67   				find "tcl${TCLVERS}" '(' -name install-sh -o -name install.sh ')' -type f | xargs chmod +x
    68     68   
    69     69   				tar -cf - "tcl${TCLVERS}" | gzip -c > "../${SRC}"
    70     70   			fi
    71     71   
    72     72   			rm -f "tmp-tcl.zip" "tmp-itcl.zip" "tmp-thread.zip" "tmp-tclconfig.zip"
    73     73   			rm -rf "tcl-${CVSTAG}" "itcl-${CVSTAG}" "thread-${CVSTAG}" "tclconfig-${CVSTAG}"
           74  +			rm -rf "tcl${TCLVERS}"
    74     75   		)
    75     76   	else
    76     77   		rm -f "${SRC}.tmp"
    77     78   		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    78     79   		mv "${SRC}.tmp" "${SRC}"
    79     80   	fi
    80     81   fi
................................................................................
   108    109   
   109    110   			(
   110    111   				. "${patchscript}"
   111    112   			)
   112    113   		fi
   113    114   	done
   114    115   
   115         -	# Patch Win32 builds to always provide DllMain if we are building KitDLL
   116         -	if [ "${KITTARGET}" = "kitdll" ]; then
   117         -		## DllMain is needed when building KitDLL
   118         -		for filetopatch in win/tclWin32Dll.c win/tclWinInit.c; do
   119         -			echo "Undefining STATIC_BUILD in \"${filetopatch}\""
   120         -
   121         -			sed 's@STATIC_BUILD@NEVER_STATIC_BUILD@g' "${filetopatch}" > "${filetopatch}.new" && cat "${filetopatch}.new" > "${filetopatch}"
   122         -			rm -f "${filetopatch}.new"
   123         -		done
   124         -	fi
   125         -
   126    116   	for dir in unix win macosx __fail__; do
   127    117   		if [ "${dir}" = "__fail__" ]; then
   128    118   			# If we haven't figured out how to build it, reject.
   129    119   
   130    120   			exit 1
   131    121   		fi
   132    122   

Added tcl/patchscripts/visibility-unhidden.sh version [05e06e331d].

            1  +#! /bin/bash
            2  +
            3  +if [ "${KITTARGET}" != "kitdll" ]; then
            4  +	exit 0
            5  +fi
            6  +
            7  +for file in unix/configure; do
            8  +	sed 's@-fvisibility@-__disabled__fvisibility@' "${file}" > "${file}.new"
            9  +	cat "${file}.new" > "${file}"
           10  +	rm -f "${file}.new"
           11  +done

Added tcl/patchscripts/win32-dllmain.sh version [610ea73aa0].

            1  +#! /bin/bash
            2  +
            3  +if [ "${KITTARGET}" != "kitdll" ]; then
            4  +	exit 0
            5  +fi
            6  +
            7  +## DllMain is needed when building KitDLL
            8  +for filetopatch in win/tclWin32Dll.c win/tclWinInit.c; do
            9  +	echo "Undefining STATIC_BUILD in \"${filetopatch}\""
           10  +
           11  +	sed 's@STATIC_BUILD@NEVER_STATIC_BUILD@g' "${filetopatch}" > "${filetopatch}.new" && cat "${filetopatch}.new" > "${filetopatch}"
           12  +	rm -f "${filetopatch}.new"
           13  +done

Modified tk/build.sh from [54785bdfbe] to [b819ea7b3f].

    13     13   
    14     14   SRC="src/tk${TCLVERS}.tar.gz"
    15     15   SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz"
    16     16   BUILDDIR="$(pwd)/build/tk${TCLVERS}"
    17     17   PATCHDIR="$(pwd)/patches"
    18     18   OUTDIR="$(pwd)/out"
    19     19   INSTDIR="$(pwd)/inst"
    20         -export SRC SRCURL BUILDDIR PATCHDIR OUTDIR INSTDIR
           20  +PATCHSCRIPTDIR="$(pwd)/patchscripts"
           21  +export SRC SRCURL BUILDDIR PATCHDIR OUTDIR INSTDIR PATCHSCRIPTDIR
    21     22   
    22     23   rm -rf 'build' 'out' 'inst'
    23     24   mkdir 'build' 'out' 'inst' || exit 1
    24     25   
    25     26   # Determine Tcl version
    26     27   TCL_VERSION="unknown"
    27     28   if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
................................................................................
    54     55   			if [ -d "tk${TCLVERS}" ]; then
    55     56   				find "tk${TCLVERS}" -name configure -type f | xargs chmod +x
    56     57                                   
    57     58   				tar -cf - "tk${TCLVERS}" | gzip -c > "../${SRC}"
    58     59   			fi
    59     60   
    60     61   			rm -f "tmp-tk.zip"
           62  +			rm -rf "tk-${CVSTAG}"
    61     63   			rm -rf "tk${TCLVERS}"
    62     64   		)
    63     65   	else
    64     66   		rm -f "${SRC}.tmp"
    65     67   		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    66     68   		mv "${SRC}.tmp" "${SRC}"
    67     69   	fi
................................................................................
    96     98   				continue
    97     99   			fi
    98    100   
    99    101   			echo "Applying: ${patch}"
   100    102   			${PATCH:-patch} -p1 < "${patch}"
   101    103   		done
   102    104   	)
          105  +
          106  +	# Apply patch scripts if needed
          107  +	for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do
          108  +		if [ -f "${patchscript}" ]; then
          109  +			echo "Running patch script: ${patchscript}"
          110  +                                
          111  +			(
          112  +				. "${patchscript}"
          113  +			)
          114  +		fi
          115  +	done
   103    116   
   104    117   	for dir in unix win macosx win64 __fail__; do
   105    118   		if [ "${dir}" = "__fail__" ]; then
   106    119   			exit 1
   107    120   		fi
   108    121   
   109    122   		# Windows/amd64 workarounds

Added tk/patchscripts/visibility-unhidden.sh version [05e06e331d].

            1  +#! /bin/bash
            2  +
            3  +if [ "${KITTARGET}" != "kitdll" ]; then
            4  +	exit 0
            5  +fi
            6  +
            7  +for file in unix/configure; do
            8  +	sed 's@-fvisibility@-__disabled__fvisibility@' "${file}" > "${file}.new"
            9  +	cat "${file}.new" > "${file}"
           10  +	rm -f "${file}.new"
           11  +done