#!/bin/bash # # Maintainer: Deposite Pirate source /usr/src/ports/Build/build.sh NAME=libraries VERSION=$(date +%Y%m%d) BUILD=1 # Description cat > ${PKG}/install/slack-desc <> ${PKG}/install/doinst.sh < /dev/null fi done } # Install texinfo files install_info rluserman config etc/pkcs11/pkcs11.conf.new EOF # Sources SRCNAME[0]=zlib SRCVERS[0]=1.2.8 SRCPACK[0]=http://zlib.net/${SRCNAME[0]}-${SRCVERS[0]}.tar.gz SRCCOPY[0]="GPL3 LGPL3" build0() { cmake \ -DCMAKE_C_FLAGS:STRING="${FLAGS}" \ -DCMAKE_CXX_FLAGS:STRING="${FLAGS}" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL="on" \ -DCMAKE_INSTALL_PREFIX:PATH="${SYS_DIR[usr]}" \ -DINSTALL_LIB_DIR:STRING="${SYS_DIR[lib]}" \ -DINSTALL_MAN_DIR:STRING="${SYS_DIR[man]}" \ -DINSTALL_PKGCONFIG_DIR:STRING="${SYS_DIR[share]}/pkgconfig" \ . make ${JOBS} make install DESTDIR="${PKG}" doc FAQ changelog ChangeLog } SRCNAME[1]=gmp SRCVERS[1]=5.1.3 SRCPACK[1]=ftp://ftp.gmplib.org/pub/gmp-${SRCVERS[1]}/${SRCNAME[1]}-${SRCVERS[1]}.tar.xz SRCCOPY[1]="GPL3 LGPL3" build1() { CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --disable-dependency-tracking \ --enable-static=no \ --enable-shared=yes \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --infodir="${SYS_DIR[info]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --localstatedir="${SYS_DIR[var]}" \ --enable-assembly \ --enable-cxx make ${JOBS} make install DESTDIR="${PKG}" doc AUTHORS changelog NEWS # No development docs rm -rf ${PKG}${SYS_DIR[info]} } SRCNAME[2]=mpfr SRCVERS[2]=3.1.2 SRCPACK[2]=http://www.mpfr.org/mpfr-current/${SRCNAME[2]}-${SRCVERS[2]}.tar.xz SRCCOPY[2]="GPL3 LGPL3" build2() { # Can't use -ffast-math with this library CFLAGS="${FLAGS%-ffast-math}" CXXFLAGS="${FLAGS%-ffast-math}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --disable-dependency-tracking \ --enable-shared=yes \ --enable-static=no \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --infodir="${SYS_DIR[info]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --localstatedir="${SYS_DIR[var]}" \ --with-gmp-include="${PKG}${SYS_DIR[include]}" \ --with-gmp-lib="${PKG}${SYS_DIR[lib]}" make ${JOBS} make install DESTDIR="${PKG}" doc AUTHORS changelog NEWS # No development docs rm -rf \ ${PKG}${SYS_DIR[doc]}/mpfr \ ${PKG}${SYS_DIR[info]} } SRCNAME[3]=libidn SRCVERS[3]=1.28 SRCPACK[3]=http://ftp.gnu.org/gnu/libidn/${SRCNAME[3]}-${SRCVERS[3]}.tar.gz SRCCOPY[3]="GPL2 LGPL3" build3() { sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --disable-dependency-tracking \ --disable-silent-rules \ --disable-rpath \ --enable-static=no \ --enable-shared=yes \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --infodir="${SYS_DIR[info]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --includedir="${SYS_DIR[include]}/idn" \ --localstatedir="${SYS_DIR[var]}" \ --with-html-dir="${SYS_DIR[html]}" \ --enable-threads=posix make ${JOBS} V=1 make install DESTDIR="${PKG}" doc AUTHORS THANKS changelog NEWS # No development docs rm -rf ${PKG}${SYS_DIR[info]} } SRCNAME[4]=libtasn1 SRCVERS[4]=3.4 SRCPACK[4]=http://ftp.gnupg.org/pub/gnutls/${SRCNAME[4]}/${SRCNAME[4]}-${SRCVERS[4]}.tar.gz SRCCOPY[4]="LGPL21 GPL3" build4() { sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' lib/Makefile.in CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --disable-dependency-tracking \ --disable-silent-rules \ --enable-static=no \ --enable-shared=yes \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --infodir="${SYS_DIR[info]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --includedir="${SYS_DIR[include]}/tasn1" \ --with-html-dir="${SYS_DIR[html]}" make ${JOBS} V=1 make install DESTDIR="${PKG}" doc AUTHORS THANKS changelog NEWS # No development docs rm -rf ${PKG}${SYS_DIR[info]} } SRCNAME[5]=libaio SRCVERS[5]=0.3.109 SRCPACK[5]=http://www.kernel.org/pub/linux/kernel/people/bcrl/aio/${SRCNAME[5]}-${SRCVERS[5]}.tar.bz2 SRCCOPY[5]="LGPL21" build5() { make ${JOBS} OPTFLAGS="${FLAGS}" make install prefix="${PKG}${SYS_DIR[usr]}" libdir="${PKG}${SYS_DIR[lib]}" changelog ChangeLog rm -f ${PKG}${SYS_DIR[lib]}/libaio.a } SRCNAME[6]=nettle SRCVERS[6]=2.7.1 SRCPACK[6]=http://www.lysator.liu.se/~nisse/archive/${SRCNAME[6]}-${SRCVERS[6]}.tar.gz SRCCOPY[6]="LGPL21" build6() { #NOTE: cannot use --disable-static as it breaks the build sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --disable-dependency-tracking \ --enable-shared \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --infodir="${SYS_DIR[info]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --localstatedir="${SYS_DIR[var]}" make ${JOBS} make install DESTDIR="${PKG}" changelog NEWS chmod 0755 ${PKG}${SYS_DIR[lib]}/*.so* # No development docs rm -rf \ ${PKG}${SYS_DIR[info]} \ ${PKG}${SYS_DIR[lib]}/lib{nettle,hogweed}.a } SRCNAME[7]=libffi SRCVERS[7]=3.0.13 SRCPACK[7]=ftp://sourceware.org/pub/${SRCNAME[7]}/${SRCNAME[7]}-${SRCVERS[7]}.tar.gz SRCCOPY[7]="MIT" build7() { sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in sed -i "s|@ARCHITECTURE@|$(uname -m)|g" include/Makefile.{am,in} libffi.pc.in CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --disable-dependency-tracking \ --enable-static=no \ --enable-shared=yes \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --infodir="${SYS_DIR[info]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --localstatedir="${SYS_DIR[var]}" make ${JOBS} make install DESTDIR="${PKG}" changelog ChangeLog #FIXME: kludge mv \ ${PKG}${SYS_DIR[lib]}64/* \ ${PKG}${SYS_DIR[lib]} rmdir ${PKG}${SYS_DIR[lib]}64 # No development docs rm -rf ${PKG}${SYS_DIR[info]} } SRCNAME[8]=popt SRCVERS[8]=1.16 SRCPACK[8]=http://rpm5.org/files/popt/${SRCNAME[8]}-${SRCVERS[8]}.tar.gz SRCCOPY[8]="MIT" build8() { sed -i 's|$(prefix)/lib/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --disable-dependency-tracking \ --disable-rpath \ --enable-static=no \ --enable-shared=yes \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --localstatedir="${SYS_DIR[var]}" make ${JOBS} make install DESTDIR="${PKG}" changelog CHANGES } SRCNAME[9]=p11-kit SRCVERS[9]=0.20.1 SRCPACK[9]=http://p11-glue.freedesktop.org/releases/${SRCNAME[9]}-${SRCVERS[9]}.tar.gz SRCCOPY[9]="BSD3" build9() { sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' p11-kit/Makefile.in sed -i 's|${libdir}/p11-kit|${libdir}/exec/p11-kit|g' configure LIBTASN1_CFLAGS="-I${PKG}${SYS_DIR[include]}/tasn1" \ LIBTASN1_LIBS="-L${PKG}${SYS_DIR[lib]} -ltasn1" \ LIBFFI_CFLAGS="-I${PKG}${SYS_DIR[include]}/$(uname -m)-linux/libffi-${SRCVERS[7]}" \ LIBFFI_LIBS="-L${PKG}${SYS_DIR[lib]} -lffi" \ CPPFLAGS="-I${PKG}${SYS_DIR[include]}/tasn1" \ CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --disable-dependency-tracking \ --disable-silent-rules \ --disable-rpath \ --enable-static=no \ --enable-shared=yes \ --enable-debug=no \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --localstatedir="${SYS_DIR[var]}" \ --with-html-dir="${SYS_DIR[html]}" \ --with-module-path="${SYS_DIR[lib]}/plugins/pkcs11" #--with-trust-paths="${SYS_DIR[share]}/ca-certificates" #--with-system-config= make ${JOBS} make install DESTDIR="${PKG}" doc AUTHORS changelog NEWS mv \ ${PKG}${SYS_DIR[etc]}/pkcs11/pkcs11.conf.example \ ${PKG}${SYS_DIR[etc]}/pkcs11/pkcs11.conf.new rm -rf ${PKG}${SYS_DIR[html]} } #NOTE: ncurses is a dependency of readline SRCNAME[10]=readline SRCVERS[10]=6.2 SRCPACK[10]=${URL[gnu]}/readline/${SRCNAME[10]}-${SRCVERS[10]}.tar.gz SRCCOPY[10]="GPL2" build10() { case "$(uname -m)" in x86_64) PIC="-fPIC" ;; esac sed -i 's|$(prefix)/lib/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in sed -i 's|-Wl,-rpath,$(libdir) ||g' support/shobj-conf CFLAGS="${FLAGS} ${PIC}" CXXFLAGS="${FLAGS}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --enable-static=yes \ --enable-shared=yes \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --infodir="${SYS_DIR[info]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --localstatedir="${SYS_DIR[var]}" \ --enable-multibyte \ --with-curses make ${JOBS} SHLIB_LIBS="-lncurses" make install DESTDIR="${PKG}" changelog CHANGES rm -rf \ ${PKG}${SYS_DIR[share]}/readline \ ${PKG}${SYS_DIR[info]}/{history,readline}* #chmod 0755 ${PKG}${SYS_DIR[lib]}/libreadline*.so.* }