diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-06-04 17:53:44 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-06-04 17:53:44 -0400 |
commit | 3b30be51008b8259db9b826b10096fb35d324a2e (patch) | |
tree | 40ed563750a299b93caa1f91f7f1885119833ea7 | |
parent | bb038280d2b5e12916d14587fd5e82455b456698 (diff) | |
download | spm_packages-3b30be51008b8259db9b826b10096fb35d324a2e.tar.gz |
Back to linux development
-rw-r--r-- | bzip2/build.sh | 10 | ||||
-rw-r--r-- | cmake/build.sh | 4 | ||||
-rw-r--r-- | git/build.sh | 1 | ||||
-rw-r--r-- | libxml2/build.sh | 11 | ||||
-rw-r--r-- | openssl/build.sh | 1 | ||||
-rw-r--r-- | python/build.sh | 34 | ||||
-rw-r--r-- | unzip/build.sh | 23 |
7 files changed, 54 insertions, 30 deletions
diff --git a/bzip2/build.sh b/bzip2/build.sh index fb9f438..7428421 100644 --- a/bzip2/build.sh +++ b/bzip2/build.sh @@ -12,23 +12,30 @@ lib_type=so function prepare() { tar xf ${name}-${version}.tar.gz cd ${name}-${version} + cp Makefile Makefile.orig + cp Makefile-libbz2_so Makefile-libbz2_so.orig + + sed -e 's|$(PREFIX)|$(DESTDIR)$(PREFIX)|g' < Makefile.orig > Makefile if [[ $(uname -s) == Darwin ]]; then # Rotate the elder signs 14.8 degrees counter-clockwise lib_type=dylib cp Makefile Makefile.orig cp Makefile-libbz2_so Makefile-libbz2_so.orig - sed -e 's|$(PREFIX)|$(DESTDIR)$(PREFIX)|g' -e 's|2\.so|2.dylib|g' < Makefile.orig > Makefile + sed -e 's|2\.so|2.dylib|g' < Makefile.orig > Makefile sed -e 's|-soname|-install_name|g' -e 's|2\.so|2.dylib|g' < Makefile-libbz2_so.orig > Makefile-libbz2_so fi + } function build() { + LDFLAGS="$LDFLAGS -fPIC" make bzip2 bzip2recover CC="gcc $CFLAGS $LDFLAGS" make -f Makefile-libbz2_so CC="gcc $CFLAGS $LDFLAGS" } function package() { + set -x # Wow, this makefile is horrible. Fix shared library names. lib_format=${lib_type}.${version} lib_format_short=${lib_type}.${version%.*} @@ -61,6 +68,7 @@ function package() { # Install binaries cp -a bzip2-shared "${_pkgdir}${_prefix}"/bin/bzip2 + ln -s libbz2.${lib_format} libbz2.${lib_type} cp -a libbz2.${lib_format} "${_pkgdir}${_prefix}"/lib cp -a libbz2.${lib_format_short} "${_pkgdir}${_prefix}"/lib cp -a libbz2.${lib_type} "${_pkgdir}${_prefix}"/lib diff --git a/cmake/build.sh b/cmake/build.sh index 1159b5a..93ee27f 100644 --- a/cmake/build.sh +++ b/cmake/build.sh @@ -5,7 +5,9 @@ revision=0 sources=( "https://github.com/Kitware/CMake/releases/download/v${version}/${name}-${version}.tar.gz" ) -depends=() +depends=( + "curl" +) function prepare() { diff --git a/git/build.sh b/git/build.sh index 22a4aed..7016f18 100644 --- a/git/build.sh +++ b/git/build.sh @@ -34,7 +34,6 @@ function prepare() { function build() { make configure - spm_debug_shell ./configure --prefix=${_prefix} \ --libdir=${_prefix}/lib \ --with-curl \ diff --git a/libxml2/build.sh b/libxml2/build.sh index 437a9dd..d42157c 100644 --- a/libxml2/build.sh +++ b/libxml2/build.sh @@ -10,10 +10,13 @@ build_depends=( "autoconf" "libtool" "pkgconf" + "python" ) depends=( "icu" "libiconv" + "ncurses" + "readline" "xz" "zlib" ) @@ -30,13 +33,17 @@ function prepare() { } function build() { - sh autogen.sh + NOCONFIGURE=1 sh autogen.sh ./configure --prefix="${_prefix}" \ --with-icu \ + --with-history \ + --with-threads \ + --with-python="${_runtime}/bin/python3" \ --with-iconv="${_runtime}" \ --with-libz="${_runtime}" \ --with-lzma="${_runtime}" - make -j${_maxjobs} + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool + PYTHONHASHSEED=0 make -j${_maxjobs} } function package() { diff --git a/openssl/build.sh b/openssl/build.sh index e7b34cf..c2c895d 100644 --- a/openssl/build.sh +++ b/openssl/build.sh @@ -13,6 +13,7 @@ depends=( function prepare() { tar xf ${name}-${version}.tar.gz cd ${name}-${version} + export LDFLAGS="-Wl,-rpath=${_runtime}" } function build() { diff --git a/python/build.sh b/python/build.sh index f34ae31..f6b854d 100644 --- a/python/build.sh +++ b/python/build.sh @@ -11,7 +11,6 @@ build_depends=( "sed" "pkgconf" "xz" - "tk==8.6.9" ) depends=( "bzip2" @@ -22,13 +21,18 @@ depends=( "ncurses" "openssl==1.1.1d" "tar" - "tk==8.6.9" "readline" "sqlite" "zlib" ) [[ $(uname) == Linux ]] && depends+=("e2fsprogs") +if [[ -z $bootstrap ]]; then + dep="tk==8.6.9" + build_depends+=($dep) + depends+=($dep) +fi + lib_type=so @@ -42,7 +46,11 @@ function prepare() { } function build() { - export CFLAGS="${CFLAGS} -I${_runtime}/include/ncursesw" + CFLAGS="-I${_runtime}/include/ncursesw ${CFLAGS}" + CFLAGS="-I${_runtime}/include/uuid ${CFLAGS}" + CPPFLAGS="${CFLAGS}" + export CFLAGS + export CPPFLAGS if [[ $(uname -s) == Darwin ]]; then CFLAGS="${CFLAGS} -I/usr/X11/include" @@ -63,7 +71,7 @@ function build() { --with-dbmliborder=gdbm:ndbm \ --with-pymalloc \ --with-system-expat \ - --without-ensurepip + --without-ensurepip CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" make -j${_maxjobs} } @@ -72,17 +80,17 @@ function package() { echo "Removing __pycache__ directories..." find "${_pkgdir}" -name "__pycache__" | xargs rm -rf - ln -s python3 "${_pkgdir}/${_prefix}"/bin/python - ln -s python3-config "${_pkgdir}/${_prefix}"/bin/python-config - ln -s idle3 "${_pkgdir}/${_prefix}"/bin/idle - ln -s pydoc3 "${_pkgdir}/${_prefix}"/bin/pydoc - ln -s python${_basever}.1 "${_pkgdir}/${_prefix}"/share/man/man1/python.1 + ln -s python3 "${_pkgdir}${_prefix}"/bin/python + ln -s python3-config "${_pkgdir}${_prefix}"/bin/python-config + ln -s idle3 "${_pkgdir}${_prefix}"/bin/idle + ln -s pydoc3 "${_pkgdir}${_prefix}"/bin/pydoc + ln -s python${_basever}.1 "${_pkgdir}${_prefix}"/share/man/man1/python.1 - if [[ -f "${_pkgdir}/${_prefix}"/lib/libpython${_basever}m.${lib_type} ]]; then - chmod 755 "${_pkgdir}/${_prefix}"/lib/libpython${_basever}m.${lib_type} + if [[ -f "${_pkgdir}${_prefix}"/lib/libpython${_basever}m.${lib_type} ]]; then + chmod 755 "${_pkgdir}${_prefix}"/lib/libpython${_basever}m.${lib_type} fi - if [[ -f "${_pkgdir}/${_prefix}"/lib/libpython${_basever%.*}.${lib_type} ]]; then - chmod 755 "${_pkgdir}/${_prefix}"/lib/libpython${_basever%.*}.${lib_type} + if [[ -f "${_pkgdir}${_prefix}"/lib/libpython${_basever%.*}.${lib_type} ]]; then + chmod 755 "${_pkgdir}${_prefix}"/lib/libpython${_basever%.*}.${lib_type} fi } diff --git a/unzip/build.sh b/unzip/build.sh index 1f76944..bd26dc7 100644 --- a/unzip/build.sh +++ b/unzip/build.sh @@ -8,6 +8,7 @@ sources=( build_depends=( "bzip2" "tar" + "patch" ) depends=( "bzip2" @@ -33,29 +34,27 @@ function prepare() { function build() { DEFINES= if [[ $(uname -s) == Linux ]]; then - DEFINES='-DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR -DLARGE_FILE_SUPPORT \ - -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DNO_LCHMOD \ - -DDATE_FORMAT=DF_YMD -DUSE_BZIP2 -DNOMEMCPY -DNO_WORKING_ISPRINT' + DEFINES='-DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR -DLARGE_FILE_SUPPORT -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DNO_LCHMOD -DDATE_FORMAT=DF_YMD -DUSE_BZIP2 -DNOMEMCPY -DNO_WORKING_ISPRINT' LF2="$LDFLAGS" elif [[ $(uname -s) == Darwin ]]; then DEFINES="-DUNIX -DBSD -DUSE_BZIP2" LF2="" fi - - echo make -f unix/Makefile \ + make -f unix/Makefile \ D_USE_BZ2=-DUSE_BZIP2 \ L_BZ2=-lbz2 \ - CF=\"$CFLAGS $CPPFLAGS -I. $DEFINES\" \ - prefix=\"${_pkgdir}${_prefix}\" \ - unzips > run.sh - - chmod +x run.sh - bash run.sh + CF="$CFLAGS $CPPFLAGS -I. $DEFINES" \ + LF="$LDFLAGS" \ + prefix="${_prefix}" \ + unzips } function package() { + mkdir -p "${_pkgdir}${_prefix}" + + [[ -f a.out ]] && mv a.out unzip make -f unix/Makefile \ install \ - prefix="${_pkgdir}${_prefix}" + prefix="${_pkgdir}${_prefix}" || spm_debug_shell } |