summaryrefslogtreecommitdiffstats
path: root/l
diff options
context:
space:
mode:
Diffstat (limited to 'l')
-rwxr-xr-xl/atk/atk.SlackBuild56
-rw-r--r--l/atk/atk.yypkg.script6
-rwxr-xr-xl/cairo/cairo.SlackBuild65
-rw-r--r--l/cairo/cairo.yypkg.script6
-rwxr-xr-xl/dbus-glib/dbus-glib.SlackBuild67
-rwxr-xr-xl/djvulibre/djvulibre.SlackBuild103
-rw-r--r--l/djvulibre/djvulibre.yypkg.script6
-rw-r--r--l/djvulibre/patches/0047-djvused-added-missing-command-remove-outline.patch41
-rw-r--r--l/djvulibre/patches/0053-portable-pthread_t-initialization.patch57
-rw-r--r--l/djvulibre/patches/0056-remove-extra-semi-in-test-for-std-c-includes.patch39
-rw-r--r--l/djvulibre/patches/0058-fixed-for-mingw.patch62
-rw-r--r--l/djvulibre/patches/0059-Attempt-to-work-around-typename-issues.patch123
-rw-r--r--l/djvulibre/patches/0060-more-mingw-fixes.patch38
-rw-r--r--l/djvulibre/patches/0061-removed-gstring-cruft.patch36
-rw-r--r--l/djvulibre/patches/0063-windows-recompile-reveals-issues.patch104
-rw-r--r--l/djvulibre/patches/0072-handle-period-in-crlf-files-as-well.patch35
-rw-r--r--l/djvulibre/patches/0077-fix-for-filename-conversion.patch39
-rw-r--r--l/djvulibre/patches/0079-locale-changes-for-win32.patch36
-rw-r--r--l/djvulibre/patches/0088-fixed-trivial-crash.patch25
-rw-r--r--l/djvulibre/patches/0094-meta-data-metadata.patch59
-rw-r--r--l/djvulibre/patches/0105-Fixed-small-bugs-from-Maks.patch69
-rw-r--r--l/djvulibre/patches/0107-Added-the-magic-win32-dll-option-in-LT_INIT-see-bug-.patch30
-rw-r--r--l/djvulibre/patches/0108-Cast-pointers-to-size_t-instead-of-unsigned-long.patch123
-rw-r--r--l/djvulibre/patches/0109-Added-code-to-define-inline-when-using-C.patch35
-rw-r--r--l/djvulibre/patches/0115-Fixed-clang-warnings.patch213
-rw-r--r--l/expat/config-regular1
-rw-r--r--l/expat/config-yypkg1
-rwxr-xr-xl/expat/expat.SlackBuild50
-rw-r--r--l/expat/expat.yypkg.script6
-rw-r--r--l/freetype/config-regular2
-rw-r--r--l/freetype/config-yypkg2
-rwxr-xr-xl/freetype/freetype.SlackBuild64
-rw-r--r--l/freetype/freetype.yypkg.script6
-rw-r--r--l/fribidi/0001-benchmark-struct-tms-is-only-available-if-sys-times..patch27
-rwxr-xr-xl/fribidi/fribidi.SlackBuild72
-rw-r--r--l/fribidi/fribidi.yypkg.script6
-rw-r--r--l/gdk-pixbuf2/doinst.sh.gzbin91 -> 0 bytes
-rwxr-xr-xl/gdk-pixbuf2/gdk-pixbuf2.SlackBuild98
-rw-r--r--l/gdk-pixbuf2/gdk-pixbuf2.yypkg.script6
-rw-r--r--l/gdk-pixbuf2/lib-Prefer-our-own-loaders-to-the-GDI+-one.patch56
-rwxr-xr-xl/giflib/giflib.SlackBuild67
-rw-r--r--l/giflib/giflib.yypkg.script6
-rwxr-xr-xl/glib-networking/glib-networking.SlackBuild62
-rw-r--r--l/glib-networking/glib-networking.yypkg.script6
-rwxr-xr-xl/glib2/glib2.SlackBuild88
-rw-r--r--l/glib2/glib2.yypkg.script6
-rwxr-xr-xl/gmp/gmp.SlackBuild70
-rw-r--r--l/gmp/gmp.yypkg.script6
-rw-r--r--l/gtk+2/doinst.sh.gzbin505 -> 0 bytes
-rwxr-xr-xl/gtk+2/gtk+2.SlackBuild150
-rw-r--r--l/gtk+2/gtk+2.yypkg.script6
-rw-r--r--l/gtk+2/gtk.xid.nowarningflood.diff.gzbin293 -> 0 bytes
-rwxr-xr-xl/gtk+2/profile.d/gtk+.csh2
-rwxr-xr-xl/gtk+2/profile.d/gtk+.sh4
-rw-r--r--l/gtk+2/update-gtk-immodules12
-rw-r--r--l/harfbuzz/0001-configure.ac-remove-icu-glib-gobject-cairo-cairo-ft-.patch109
-rw-r--r--l/harfbuzz/config-regular1
-rw-r--r--l/harfbuzz/config-yypkg1
-rwxr-xr-xl/harfbuzz/harfbuzz.SlackBuild61
-rw-r--r--l/harfbuzz/harfbuzz.yypkg.script6
-rwxr-xr-xl/icu4c/icu4c.SlackBuild95
-rw-r--r--l/icu4c/icu4c.yypkg.script6
-rwxr-xr-xl/lcms/lcms.SlackBuild67
-rw-r--r--l/lcms/lcms.yypkg.script6
-rw-r--r--l/lcms/lcms1.19-avoid-buffer-overflows-CVE-2013-4276.patch62
-rwxr-xr-xl/lcms2/lcms2.SlackBuild64
-rw-r--r--l/lcms2/lcms2.yypkg.script6
-rwxr-xr-xl/libao/libao.SlackBuild50
-rw-r--r--l/libao/libao.yypkg.script6
-rw-r--r--l/libarchive/0001-windows-don-t-undef-stat-since-it-my-be-defined-to-s.patch90
-rw-r--r--l/libarchive/config-regular1
-rw-r--r--l/libarchive/config-yypkg13
-rwxr-xr-xl/libarchive/libarchive.SlackBuild69
-rw-r--r--l/libarchive/libarchive.yypkg.script6
-rw-r--r--l/libarchive/use-static-asserts-to-guarantee-abi-compatibility.patch26
-rwxr-xr-xl/libcddb/libcddb.SlackBuild60
-rw-r--r--l/libcddb/libcddb.yypkg.script6
-rwxr-xr-xl/libcdio/libcdio.SlackBuild75
-rw-r--r--l/libcdio/libcdio.yypkg.script6
-rwxr-xr-xl/libdvdread/libdvdread.SlackBuild84
-rw-r--r--l/libdvdread/libdvdread.yypkg.script6
-rwxr-xr-xl/libffi/libffi.SlackBuild72
-rw-r--r--l/libffi/libffi.yypkg.script6
-rwxr-xr-xl/libid3tag/libid3tag.SlackBuild68
-rw-r--r--l/libid3tag/libid3tag.yypkg.script6
-rwxr-xr-xl/libidn/libidn.SlackBuild76
-rw-r--r--l/libidn/libidn.yypkg.script6
-rw-r--r--l/libjpeg/config-regular1
-rw-r--r--l/libjpeg/config-yypkg2
-rw-r--r--l/libjpeg/jpeg.CVE-2013-6629.diff.gzbin694 -> 0 bytes
-rwxr-xr-xl/libjpeg/libjpeg.SlackBuild57
-rw-r--r--l/libjpeg/libjpeg.yypkg.script6
-rw-r--r--l/libmad/Makefile.am100
-rw-r--r--l/libmad/configure.ac286
-rwxr-xr-xl/libmad/libmad.SlackBuild78
-rw-r--r--l/libmad/libmad.yypkg.script6
-rw-r--r--l/libmad/mad.pc.in12
-rwxr-xr-xl/libmpc/libmpc.SlackBuild70
-rw-r--r--l/libmpc/libmpc.yypkg.script6
-rwxr-xr-xl/libogg/libogg.SlackBuild66
-rw-r--r--l/libogg/libogg.yypkg.script6
-rwxr-xr-xl/libpng/libpng.SlackBuild104
-rw-r--r--l/libpng/libpng.yypkg.script6
-rwxr-xr-xl/libsndfile/libsndfile.SlackBuild65
-rw-r--r--l/libsndfile/libsndfile.yypkg.script6
-rw-r--r--l/libsoup/libsoup-2.42.3.1-fix-build-without-ntml.patch32
-rwxr-xr-xl/libsoup/libsoup.SlackBuild56
-rw-r--r--l/libsoup/libsoup.yypkg.script6
-rwxr-xr-xl/libtasn1/libtasn1.SlackBuild64
-rw-r--r--l/libtasn1/libtasn1.yypkg.script6
-rw-r--r--l/libtheora/ax_prog_cc_for_build.m4125
-rwxr-xr-xl/libtheora/libtheora.SlackBuild105
-rw-r--r--l/libtheora/libtheora.yypkg.script6
-rwxr-xr-xl/libtiff/libtiff.SlackBuild67
-rw-r--r--l/libtiff/libtiff.yypkg.script6
-rwxr-xr-xl/libvorbis/libvorbis.SlackBuild68
-rw-r--r--l/libvorbis/libvorbis.yypkg.script6
-rwxr-xr-xl/libxml2/libxml2.SlackBuild91
-rw-r--r--l/libxml2/libxml2.yypkg.script6
-rwxr-xr-xl/libxslt/libxslt.SlackBuild86
-rw-r--r--l/libxslt/libxslt.yypkg.script6
-rwxr-xr-xl/mozilla-nss/mozilla-nss.SlackBuild2
-rw-r--r--l/mpfr/mpfr-3.1.2.tar.xz.sigbin72 -> 0 bytes
-rwxr-xr-xl/mpfr/mpfr.SlackBuild73
-rw-r--r--l/mpfr/mpfr.yypkg.script6
-rwxr-xr-xl/pango/pango.SlackBuild124
-rw-r--r--l/pango/pango.etc.host.location.diff.gzbin582 -> 0 bytes
-rw-r--r--l/pango/pango.yypkg.script6
-rw-r--r--l/pango/update-pango-querymodules85
-rwxr-xr-xl/pcre/pcre.SlackBuild68
-rw-r--r--l/pcre/pcre.yypkg.script6
-rw-r--r--l/qt/0001-QCoreApplication-ibraryPaths-discovers-plugpath-rela.patch38
-rw-r--r--l/qt/0001-configure-use-pkg-config-for-libpng.patch53
-rw-r--r--l/qt/0002-Use-widl-instead-of-midl.-Also-set-QMAKE_DLLTOOL-to-.patch29
-rw-r--r--l/qt/0003-Tell-qmake-to-use-pkg-config.patch24
-rw-r--r--l/qt/config-native53
-rw-r--r--l/qt/config-regular14
-rwxr-xr-xl/qt/qt.SlackBuild396
-rw-r--r--l/qt/qt.fix.broken.gif.crash.diff.gzbin328 -> 362 bytes
-rw-r--r--l/qt/qt.yypkg.script6
-rw-r--r--l/qt/qt5-dont-add-resource-files-to-qmake-libs.patch11
-rw-r--r--l/qt/qt5-dont-build-host-libs-static.patch19
-rw-r--r--l/qt/qt5-qmake-implib-dll-a.patch33
-rw-r--r--l/qt/qt5-use-system-zlib-in-host-libs.patch66
-rw-r--r--l/qt/qt5-workaround-qtbug-29426.patch12
-rw-r--r--l/sdl/config-base1
-rw-r--r--l/sdl/config-image1
-rw-r--r--l/sdl/config-mixer1
-rw-r--r--l/sdl/config-net1
-rw-r--r--l/sdl/config-ttf1
-rwxr-xr-xl/sdl/sdl.SlackBuild330
-rw-r--r--l/sdl/sdl.yypkg.script6
-rw-r--r--l/zlib/Makefile.yypkg140
-rw-r--r--l/zlib/config-regular2
-rw-r--r--l/zlib/config-yypkg2
-rwxr-xr-xl/zlib/zlib.SlackBuild104
-rw-r--r--l/zlib/zlib.yypkg.script6
157 files changed, 4663 insertions, 2240 deletions
diff --git a/l/atk/atk.SlackBuild b/l/atk/atk.SlackBuild
index e067146..4828700 100755
--- a/l/atk/atk.SlackBuild
+++ b/l/atk/atk.SlackBuild
@@ -41,22 +41,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-atk
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
-mkdir -p $TMP $PKG/usr
+mkdir -p $TMP $PKG/${PREFIX}
cd $TMP
rm -rf atk-$VERSION
tar xvf $CWD/atk-$VERSION.tar.xz || exit 1
@@ -68,23 +54,26 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --mandir=/${PREFIX}/man \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -97,22 +86,25 @@ if [ -d $PKG/usr/man ]; then
)
fi
-mkdir -p $PKG/usr/doc/atk-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/atk-$VERSION
cp -a \
AUTHORS COPYING* NEWS README* TODO \
- $PKG/usr/doc/atk-$VERSION
+ $PKG/${PREFIX}/doc/atk-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/atk-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/atk/atk.yypkg.script b/l/atk/atk.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/atk/atk.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/cairo/cairo.SlackBuild b/l/cairo/cairo.SlackBuild
index f92b8f2..05f9c1c 100755
--- a/l/cairo/cairo.SlackBuild
+++ b/l/cairo/cairo.SlackBuild
@@ -37,20 +37,6 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -62,33 +48,26 @@ rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION
chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+chmod -R u+w,go+r-w,a-s .
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
--sysconfdir=/etc \
+ --disable-xlib \
--disable-gtk-doc \
--disable-quartz \
--disable-static \
- --disable-win32 \
--disable-trace \
- --enable-xlib \
- --enable-xcb \
--enable-ps \
--enable-pdf \
--enable-svg \
- --enable-tee \
--enable-ft \
- --enable-gl \
--enable-gobject \
- --enable-xml \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux
# None of these are 'stable' yet...
@@ -108,25 +87,29 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS BIBLIOGRAPHY BUGS CODING_STYLE COPYING* HACKING NEWS PORTING_GUIDE README RELEASING \
- $PKG/usr/doc/$PKGNAM-$VERSION
-( cd $PKG/usr/doc/$PKGNAM-$VERSION ; ln -sf /usr/share/gtk-doc/html/cairo html )
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
+( cd $PKG/${PREFIX}/doc/$PKGNAM-$VERSION ; ln -sf /${PREFIX}/share/gtk-doc/html/cairo html )
+ln -sf ../share/gtk-doc/html/cairo $PKG/${PREFIX}/doc/$PKGNAM-$VERSION/html
# We do not need the entire NEWS file.
if [ -r NEWS ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat NEWS | head -n 1000 > $DOCSDIR/NEWS
touch -r NEWS $DOCSDIR/NEWS
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
+cat ${CWD}/$PKGNAM.yypkg.script | sed \
+ -e "s/%{PKG}/$PKGNAM/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/cairo/cairo.yypkg.script b/l/cairo/cairo.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/cairo/cairo.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/dbus-glib/dbus-glib.SlackBuild b/l/dbus-glib/dbus-glib.SlackBuild
index e4dd8b5..831b42f 100755
--- a/l/dbus-glib/dbus-glib.SlackBuild
+++ b/l/dbus-glib/dbus-glib.SlackBuild
@@ -42,20 +42,6 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -63,33 +49,33 @@ rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+chmod -R u+w,go+r-w,a-s .
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --localstatedir=/${PREFIX}/var \
+ --mandir=/${PREFIX}/man \
--enable-shared=yes \
--enable-static=no \
+ --enable-abstract-sockets=no \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -102,25 +88,28 @@ if [ -d $PKG/usr/man ]; then
)
fi
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* HACKING INSTALL NEWS README* \
- $PKG/usr/doc/$PKGNAM-$VERSION
-( cd $PKG/usr/doc/$PKGNAM-$VERSION
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
+( cd $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
ln -s ../../share/gtk-doc/html/dbus-glib/ html
)
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/$(echo ${VERSION} | tr . ' ')/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/djvulibre/djvulibre.SlackBuild b/l/djvulibre/djvulibre.SlackBuild
index 9d2f676..fc24f24 100755
--- a/l/djvulibre/djvulibre.SlackBuild
+++ b/l/djvulibre/djvulibre.SlackBuild
@@ -40,24 +40,11 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP || exit 1
-rm -rf $PKGNAM-$VERSION || rm -rf $PKGNAM-$(echo $VERSION | rev | cut -f 2- -d . | rev)
+rm -rf $PKGNAM-$VERSION
+rm -rf $PKGNAM-$(echo $VERSION | rev | cut -f 2- -d . | rev)
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || cd $PKGNAM-$(echo $VERSION | rev | cut -f 2- -d . | rev) || exit 1
chown -R root:root .
@@ -67,63 +54,87 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+for i in ${CWD}/patches/*.patch; do
+ patch -p1 -i $i || exit 1
+done
+
# The qt stuff really isn't needed here, as the viewer won't build
# with qt4 (and djview4 is now a separate package).
# It won't matter, as we only need the headers and libs
# anyway for okular to use, so ignore the warnings... :)
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+autoreconf -fiv
+
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --localstatedir=/var \
- --sysconfdir=/etc \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --with-qt=/usr/lib${LIBDIRSUFFIX}/qt \
- --build=$ARCH-slackware-linux
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --localstatedir=/${PREFIX}/var \
+ --sysconfdir=/${PREFIX}/etc \
+ --mandir=/${PREFIX}/man \
+ --infodir=/${PREFIX}/info \
+ --docdir=/${PREFIX}/doc/$PKGNAM-$VERSION \
+ --with-qt=/${PREFIX}/lib${LIBDIRSUFFIX}/qt \
+ --build=${BUILD_TRIPLET} \
+ --host=${HOST_TRIPLET}
make clean || exit 1
make depend || exit 1
make || exit 1 # This isn't fully compatible with threaded make
make install DESTDIR=$PKG || exit 1
+for i in $PKG/${PREFIX}/bin/*; do
+ case $i in
+ *.dll) continue;;
+ *.exe) continue;;
+ esac
+ if file $i | grep -q "PE32+\? executable"; then
+ mv $i $i.exe
+ fi
+done
+
# This plugin *should* work with Mozilla-based browsers
-if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/netscape ]; then
- mv $PKG/usr/lib${LIBDIRSUFFIX}/{netscape,mozilla}
+if [ -d $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/netscape ]; then
+ mv $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/{netscape,mozilla}
fi
-mkdir -p $PKG/usr/share/mime/packages
-cp $PKG/usr/share/djvu/osi/desktop/djvulibre-mime.xml \
- $PKG/usr/share/mime/packages
+mkdir -p $PKG/${PREFIX}/share/mime/packages
+cp $PKG/${PREFIX}/share/djvu/osi/desktop/djvulibre-mime.xml \
+ $PKG/${PREFIX}/share/mime/packages
-if [ -x $PKG/usr/bin/djview3 ]; then
- mkdir -p $PKG/usr/share/{applications,pixmaps}
- cp $PKG/usr/share/djvu/djview3/desktop/*.desktop \
- $PKG/usr/share/applications
- cp $PKG/usr/share/djvu/djview3/desktop/hi32-djview3.png \
- $PKG/usr/share/pixmaps/djvulibre-djview3.png
+if [ -x $PKG/${PREFIX}/bin/djview3 ]; then
+ mkdir -p $PKG/${PREFIX}/share/{applications,pixmaps}
+ cp $PKG/${PREFIX}/share/djvu/djview3/desktop/*.desktop \
+ $PKG/${PREFIX}/share/applications
+ cp $PKG/${PREFIX}/share/djvu/djview3/desktop/hi32-djview3.png \
+ $PKG/${PREFIX}/share/pixmaps/djvulibre-djview3.png
fi
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Strip files
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-( cd $PKG/usr/man
+( cd $PKG/${PREFIX}/man
find . -type f -exec gzip -9 {} \;
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
COPYING* COPYRIGHT INSTALL NEWS README* TODO \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/djvulibre/djvulibre.yypkg.script b/l/djvulibre/djvulibre.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/djvulibre/djvulibre.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/djvulibre/patches/0047-djvused-added-missing-command-remove-outline.patch b/l/djvulibre/patches/0047-djvused-added-missing-command-remove-outline.patch
new file mode 100644
index 0000000..f42bd87
--- /dev/null
+++ b/l/djvulibre/patches/0047-djvused-added-missing-command-remove-outline.patch
@@ -0,0 +1,41 @@
+From 26d4ce1d1ffe293554a79bfde6b70c7b0b9c8c7b Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Tue, 2 Oct 2012 19:04:49 -0700
+Subject: [PATCH 047/117] djvused: added missing command remove-outline.
+
+---
+ tools/djvused.cpp | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/tools/djvused.cpp b/tools/djvused.cpp
+index e9df80f..c739418 100644
+--- a/tools/djvused.cpp
++++ b/tools/djvused.cpp
+@@ -1871,6 +1871,16 @@ command_set_outline(ParsingByteStream &pbs)
+ }
+ }
+
++void
++command_remove_outline(ParsingByteStream &pbs)
++{
++ if (g().doc->get_djvm_nav())
++ {
++ g().doc->set_djvm_nav(0);
++ modified = true;
++ }
++}
++
+ static bool
+ callback_thumbnails(int page_num, void *)
+ {
+@@ -2094,6 +2104,7 @@ static GMap<GUTF8String,CommandFunc> &command_map() {
+ xcommand_map["remove-ant"] = command_remove_ant;
+ xcommand_map["remove-meta"] = command_remove_meta;
+ xcommand_map["remove-txt"] = command_remove_txt;
++ xcommand_map["remove-outline"] = command_remove_outline;
+ xcommand_map["remove-thumbnails"] = command_remove_thumbnails;
+ xcommand_map["remove-xmp"] = command_remove_xmp;
+ xcommand_map["set-page-title"] = command_set_page_title;
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0053-portable-pthread_t-initialization.patch b/l/djvulibre/patches/0053-portable-pthread_t-initialization.patch
new file mode 100644
index 0000000..11df8c6
--- /dev/null
+++ b/l/djvulibre/patches/0053-portable-pthread_t-initialization.patch
@@ -0,0 +1,57 @@
+From 138918d75cabeff4facb360950406930d55473f3 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Mon, 4 Feb 2013 11:56:16 -0500
+Subject: [PATCH 053/117] portable pthread_t initialization
+
+---
+ libdjvu/GThreads.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libdjvu/GThreads.cpp b/libdjvu/GThreads.cpp
+index 253fed8..4b6551f 100644
+--- a/libdjvu/GThreads.cpp
++++ b/libdjvu/GThreads.cpp
+@@ -387,6 +387,7 @@ GMonitor::wait(unsigned long timeout)
+ #define pthread_condattr_default NULL
+ #endif
+
++static pthread_t pthread_null; // portable zero initialization!
+
+ void *
+ GThread::start(void *arg)
+@@ -440,13 +441,13 @@ GThread::start(void *arg)
+ // GThread
+
+ GThread::GThread(int stacksize) :
+- hthr(0), xentry(0), xarg(0)
++ hthr(pthread_null), xentry(0), xarg(0)
+ {
+ }
+
+ GThread::~GThread()
+ {
+- hthr = 0;
++ hthr = pthread_null;
+ }
+
+ int
+@@ -506,7 +507,7 @@ GThread::current()
+ // -- GMonitor
+
+ GMonitor::GMonitor()
+- : ok(0), count(1), locker(0)
++ : ok(0), count(1), locker(pthread_null)
+ {
+ // none of this should be necessary ... in theory.
+ #ifdef PTHREAD_MUTEX_INITIALIZER
+@@ -549,7 +550,6 @@ GMonitor::enter()
+ void
+ GMonitor::leave()
+ {
+- static pthread_t pthread_null;
+ pthread_t self = pthread_self();
+ if (ok && (count>0 || !pthread_equal(locker, self)))
+ G_THROW( ERR_MSG("GThreads.not_acq_broad") );
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0056-remove-extra-semi-in-test-for-std-c-includes.patch b/l/djvulibre/patches/0056-remove-extra-semi-in-test-for-std-c-includes.patch
new file mode 100644
index 0000000..70acb22
--- /dev/null
+++ b/l/djvulibre/patches/0056-remove-extra-semi-in-test-for-std-c-includes.patch
@@ -0,0 +1,39 @@
+From 9ad44a1813025d288b3e7d17afe6bae32a286439 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Sun, 10 Feb 2013 09:10:16 -0500
+Subject: [PATCH 056/117] remove extra semi in test for std c++ includes.
+
+---
+ config/acinclude.m4 | 2 +-
+ configure | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/config/acinclude.m4 b/config/acinclude.m4
+index 3eb61f1..c07caac 100644
+--- a/config/acinclude.m4
++++ b/config/acinclude.m4
+@@ -244,7 +244,7 @@ ac_cv_cxx_stdincludes,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <new>
+-struct X { int a; X(int a):a(a){}; };
++struct X { int a; X(int a):a(a){} };
+ X* foo(void *x) { return new(x) X(2); } ],[],
+ ac_cv_cxx_stdincludes=yes, ac_cv_cxx_stdincludes=no)
+ AC_LANG_RESTORE
+diff --git a/configure b/configure
+index df6f3ca..008977d 100755
+--- a/configure
++++ b/configure
+@@ -15953,7 +15953,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <new>
+-struct X { int a; X(int a):a(a){}; };
++struct X { int a; X(int a):a(a){} };
+ X* foo(void *x) { return new(x) X(2); }
+ int
+ main ()
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0058-fixed-for-mingw.patch b/l/djvulibre/patches/0058-fixed-for-mingw.patch
new file mode 100644
index 0000000..f058158
--- /dev/null
+++ b/l/djvulibre/patches/0058-fixed-for-mingw.patch
@@ -0,0 +1,62 @@
+From 7097ec338c9a10f4c7491e677bcbd5045b135f19 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Mon, 11 Feb 2013 21:43:53 -0500
+Subject: [PATCH 058/117] fixed for mingw
+
+---
+ libdjvu/GOS.cpp | 3 ++-
+ libdjvu/GString.h | 14 ++++++++------
+ 2 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/libdjvu/GOS.cpp b/libdjvu/GOS.cpp
+index d2088e2..6ae8561 100644
+--- a/libdjvu/GOS.cpp
++++ b/libdjvu/GOS.cpp
+@@ -78,6 +78,7 @@
+
+ #if defined(WIN32) && !defined(UNIX)
+ # include <windows.h>
++# include <string.h>
+ # include <direct.h>
+ # define getcwd _getcwd
+ #endif
+@@ -148,7 +149,7 @@ strerror(int errno)
+ extern char *sys_errlist[];
+ if (errno>0 && errno<sys_nerr)
+ return sys_errlist[errno];
+- return "unknown stdio error";
++ return (char*) "unknown stdio error";
+ }
+ #endif
+
+diff --git a/libdjvu/GString.h b/libdjvu/GString.h
+index 3aa1f76..bbbc3f5 100644
+--- a/libdjvu/GString.h
++++ b/libdjvu/GString.h
+@@ -113,15 +113,17 @@
+ #include <stdarg.h>
+ #ifdef WIN32
+ # include <windows.h>
+-# define HAS_WCHAR 1
+-# define HAS_WCTYPE 1
+-# define HAS_MBSTATE 1
++# ifndef AUTOCONF
++# define HAS_WCHAR 1
++# define HAS_WCTYPE 1
++# define HAS_MBSTATE 1
++# endif
+ #endif
+
+ #if HAS_WCHAR
+-# if !defined(AUTOCONF) || HAVE_WCHAR_H
+-# include <wchar.h>
+-# endif
++# include <wchar.h>
++#elif HAVE_WCHAR_H
++# include <wchar.h>
+ #endif
+
+ #if HAVE_STDINT_H
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0059-Attempt-to-work-around-typename-issues.patch b/l/djvulibre/patches/0059-Attempt-to-work-around-typename-issues.patch
new file mode 100644
index 0000000..9ef8396
--- /dev/null
+++ b/l/djvulibre/patches/0059-Attempt-to-work-around-typename-issues.patch
@@ -0,0 +1,123 @@
+From 8bb9781d287a7d2b0573a1d46f2b3c80bb0ed2cc Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Mon, 11 Feb 2013 22:39:44 -0500
+Subject: [PATCH 059/117] Attempt to work around "typename" issues
+
+---
+ libdjvu/GContainer.h | 22 ++++++++++++----------
+ 1 file changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/libdjvu/GContainer.h b/libdjvu/GContainer.h
+index efe182b..ef7681b 100644
+--- a/libdjvu/GContainer.h
++++ b/libdjvu/GContainer.h
+@@ -829,9 +829,9 @@ public:
+ template<class TI>
+ class GListImpl : public GListBase
+ {
++ typedef GCONT ListNode<TI> LNode;
+ protected:
+ GListImpl();
+- typedef GCONT ListNode<TI> LNode;
+ static Node * newnode(const TI &elt);
+ int operator==(const GListImpl<TI> &l2) const;
+ int search(const TI &elt, GPosition &pos) const;
+@@ -884,6 +884,7 @@ GListImpl<TI>::search(const TI &elt, GPosition &pos) const
+ template <class TYPE, class TI>
+ class GListTemplate : protected GListImpl<TI>
+ {
++ typedef GCONT ListNode<TI> LNode;
+ public:
+ // -- ACCESS
+ /** Returns the number of elements in the list. */
+@@ -904,7 +905,7 @@ public:
+ segmentation violation. See \Ref{GPosition} for efficient operations on
+ positions. */
+ TYPE& operator[](GPosition pos)
+- { return (TYPE&) (((typename GListImpl<TI>::LNode *)pos.check((void*)this))->val); }
++ { return (TYPE&) (((LNode *)pos.check((void*)this))->val); }
+ /** Returns a constant reference to the list element at position #pos#.
+ This reference only be used for reading a list element. An exception
+ \Ref{GException} is thrown if #pos# is not a valid position. This
+@@ -912,7 +913,7 @@ public:
+ GList<TYPE>#. See \Ref{GPosition} for efficient operations on
+ positions. */
+ const TYPE& operator[](GPosition pos) const
+- { return (const TYPE&) (((const typename GListImpl<TI>::LNode *)pos.check((void*)this))->val); }
++ { return (const TYPE&) (((const LNode *)pos.check((void*)this))->val); }
+ // -- TEST
+ /** Tests whether a list is empty.
+ Returns a non zero value if the list contains no elements. */
+@@ -1099,10 +1100,10 @@ public:
+ template <class K>
+ class GSetImpl : public GSetBase
+ {
++ typedef GCONT SetNode<K> SNode;
+ protected:
+ GSetImpl();
+ GSetImpl(const Traits &traits);
+- typedef GCONT SetNode<K> SNode;
+ HNode *get(const K &key) const;
+ HNode *get_or_throw(const K &key) const;
+ HNode *get_or_create(const K &key);
+@@ -1171,10 +1172,10 @@ GSetImpl<K>::get_or_create(const K &key)
+ template <class K, class TI>
+ class GMapImpl : public GSetImpl<K>
+ {
++ typedef GCONT MapNode<K,TI> MNode;
+ protected:
+ GMapImpl();
+ GMapImpl(const GCONT Traits &traits);
+- typedef GCONT MapNode<K,TI> MNode;
+ GCONT HNode* get_or_create(const K &key);
+ };
+
+@@ -1217,6 +1218,7 @@ GMapImpl<K,TI>::get_or_create(const K &key)
+ template <class KTYPE, class VTYPE, class TI>
+ class GMapTemplate : protected GMapImpl<KTYPE,TI>
+ {
++ typedef GCONT MapNode<KTYPE,TI> MNode;
+ public:
+ /** Returns the number of elements in the map. */
+ int size() const
+@@ -1249,32 +1251,32 @@ public:
+ #pos#. An exception \Ref{GException} is thrown if position #pos# is not
+ valid. There is no direct way to change the key of a map entry. */
+ const KTYPE &key(const GPosition &pos) const
+- { return (const KTYPE&)(((typename GMapImpl<KTYPE,TI>::MNode*)(pos.check((void*)this)))->key); }
++ { return (const KTYPE&)(((MNode*)(pos.check((void*)this)))->key); }
+ /** Returns a reference to the value of the map entry at position #pos#.
+ This reference can be used for both reading (as "#a[n]#") and modifying
+ (as "#a[n]=v#"). An exception \Ref{GException} is thrown if position
+ #pos# is not valid. */
+ VTYPE& operator[](const GPosition &pos)
+- { return (VTYPE&)(((typename GMapImpl<KTYPE,TI>::MNode*)(pos.check((void*)this)))->val); }
++ { return (VTYPE&)(((MNode*)(pos.check((void*)this)))->val); }
+ /** Returns a constant reference to the value of the map entry at position
+ #pos#. This reference can only be used for reading (as "#a[n]#") the
+ entry value. An exception \Ref{GException} is thrown if position #pos#
+ is not valid. */
+ const VTYPE& operator[](const GPosition &pos) const
+- { return (const VTYPE&)(((typename GMapImpl<KTYPE,TI>::MNode*)(pos.check((void*)this)))->val); }
++ { return (const VTYPE&)(((MNode*)(pos.check((void*)this)))->val); }
+ /** Returns a constant reference to the value of the map entry for key
+ #key#. This reference can only be used for reading (as "#a[n]#") the
+ entry value. An exception \Ref{GException} is thrown if no entry
+ contains key #key#. This variant of #operator[]# is necessary when
+ dealing with a #const GMAP<KTYPE,VTYPE>#. */
+ const VTYPE& operator[](const KTYPE &key) const
+- { return (const VTYPE&)(((const typename GMapImpl<KTYPE,TI>::MNode*)(this->get_or_throw(key)))->val); }
++ { return (const VTYPE&)(((const MNode*)(this->get_or_throw(key)))->val); }
+ /** Returns a reference to the value of the map entry for key #key#. This
+ reference can be used for both reading (as "#a[n]#") and modifying (as
+ "#a[n]=v#"). If there is no entry for key #key#, a new entry is created
+ for that key with the null constructor #VTYPE::VTYPE()#. */
+ VTYPE& operator[](const KTYPE &key)
+- { return (VTYPE&)(((typename GMapImpl<KTYPE,TI>::MNode*)(this->get_or_create(key)))->val); }
++ { return (VTYPE&)(((MNode*)(this->get_or_create(key)))->val); }
+ /** Destroys the map entry for position #pos#.
+ Nothing is done if position #pos# is not a valid position. */
+ void del(GPosition &pos)
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0060-more-mingw-fixes.patch b/l/djvulibre/patches/0060-more-mingw-fixes.patch
new file mode 100644
index 0000000..cabc82c
--- /dev/null
+++ b/l/djvulibre/patches/0060-more-mingw-fixes.patch
@@ -0,0 +1,38 @@
+From 8f4126d3ab3afc256e8c4571a6bf788700293a77 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Wed, 13 Feb 2013 09:01:31 -0500
+Subject: [PATCH 060/117] more mingw fixes
+
+---
+ libdjvu/GString.cpp | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/libdjvu/GString.cpp b/libdjvu/GString.cpp
+index dd5ddf6..467acb8 100644
+--- a/libdjvu/GString.cpp
++++ b/libdjvu/GString.cpp
+@@ -88,16 +88,12 @@
+ #endif
+ #include <ctype.h>
+
+-#ifndef DO_CHANGELOCALE
+-#define DO_CHANGELOCALE 1
+-#ifdef UNIX
+-#if THREADMODEL != COTHREADS
+-#if THREADMODEL != NOTHREADS
+-#undef DO_CHANGELOCALE
+-#define DO_CHANGELOCALE 0
+-#endif
+-#endif
++#ifndef LC_NUMERIC //MingW
++# undef DO_CHANGELOCALE
++# define LC_NUMERIC 0
+ #endif
++#ifndef DO_CHANGELOCALE
++# define DO_CHANGELOCALE 0
+ #endif
+
+
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0061-removed-gstring-cruft.patch b/l/djvulibre/patches/0061-removed-gstring-cruft.patch
new file mode 100644
index 0000000..8504d9b
--- /dev/null
+++ b/l/djvulibre/patches/0061-removed-gstring-cruft.patch
@@ -0,0 +1,36 @@
+From eba411c42f6022d56a43da147e4ced714ee89999 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Thu, 14 Feb 2013 18:52:32 -0500
+Subject: [PATCH 061/117] removed gstring cruft
+
+---
+ libdjvu/GString.cpp | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/libdjvu/GString.cpp b/libdjvu/GString.cpp
+index 467acb8..caf2415 100644
+--- a/libdjvu/GString.cpp
++++ b/libdjvu/GString.cpp
+@@ -2145,19 +2145,6 @@ GStringRep::concat(const GP<GStringRep> &s1,const GP<GStringRep> &s2) const
+ return retval;
+ }
+
+-#ifdef WIN32
+-static const char *setlocale_win32(void)
+-{
+- static const char *locale=setlocale(LC_ALL,0);
+- if(! locale || (locale[0] == 'C' && !locale[1]))
+- {
+- locale=setlocale(LC_ALL,"");
+- }
+- return locale;
+-}
+-const char *setlocale_win32_var = setlocale_win32();
+-#endif
+-
+ GStringRep::GStringRep(void)
+ {
+ size=0;
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0063-windows-recompile-reveals-issues.patch b/l/djvulibre/patches/0063-windows-recompile-reveals-issues.patch
new file mode 100644
index 0000000..07c8728
--- /dev/null
+++ b/l/djvulibre/patches/0063-windows-recompile-reveals-issues.patch
@@ -0,0 +1,104 @@
+From 7d500a03d34cb438f2b643d6530d1f79c249d833 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Fri, 29 Mar 2013 14:14:00 -0800
+Subject: [PATCH 063/117] windows recompile reveals issues
+
+---
+ libdjvu/GException.cpp | 15 +++++----------
+ libdjvu/JPEGDecoder.cpp | 8 ++++++--
+ win32/djvulibre/djvulibre-install.sh | 2 +-
+ win32/djvulibre/djvulibre.nsi | 2 +-
+ 4 files changed, 13 insertions(+), 14 deletions(-)
+
+diff --git a/libdjvu/GException.cpp b/libdjvu/GException.cpp
+index 89da70f..ddec4c1 100644
+--- a/libdjvu/GException.cpp
++++ b/libdjvu/GException.cpp
+@@ -257,21 +257,16 @@ GExceptionHandler::rethrow(void)
+ // This is not activated when C++ memory management
+ // is overidden. The overriding functions handle
+ // memory exceptions by themselves.
+-# if defined(_MSC_VER)
+-// Microsoft is different!
+-static int throw_memory_error(size_t) { G_THROW(GException::outofmemory); return 0; }
+-static int (*old_handler)(size_t) = _set_new_handler(throw_memory_error);
+-# else // !_MSC_VER
+-// Standard C++
+ static void throw_memory_error() { G_THROW(GException::outofmemory); }
+-# if !defined(WIN32) && !defined(__CYGWIN32__) && !defined(OS2)
++# if defined(WIN32) || defined(__CYGWIN32__) || defined(OS2)
++static void (*old_handler)() = std::set_new_handler(throw_memory_error);
++# else
+ # ifdef HAVE_STDINCLUDES
+ static void (*old_handler)() = std::set_new_handler(throw_memory_error);
+ # else
+ static void (*old_handler)() = set_new_handler(throw_memory_error);
+-# endif // HAVE_STDINCLUDES
+-# endif // ! WIN32
+-# endif // !_MSC_VER
++# endif // HAVE_STDINCLUDES
++# endif // ! WIN32
+ #endif // !NEED_DJVU_MEMORY
+
+
+diff --git a/libdjvu/JPEGDecoder.cpp b/libdjvu/JPEGDecoder.cpp
+index f22f77a..05f68ff 100644
+--- a/libdjvu/JPEGDecoder.cpp
++++ b/libdjvu/JPEGDecoder.cpp
+@@ -62,21 +62,25 @@
+
+ #ifdef NEED_JPEG_DECODER
+
+-#include "JPEGDecoder.h"
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ #undef HAVE_STDLIB_H
+ #undef HAVE_STDDEF_H
++#define INT32 jpeg_INT32
++#define INT16 jpeg_INT16
+ #include <stdio.h>
+ #include <jconfig.h>
+ #include <jpeglib.h>
+ #include <jerror.h>
++#undef FAR
++#undef INT32
++#undef INT16
+ #ifdef __cplusplus
+ }
+ #endif
+
++#include "JPEGDecoder.h"
+ #include "ByteStream.h"
+ #include "GPixmap.h"
+ #ifdef LIBJPEGNAME
+diff --git a/win32/djvulibre/djvulibre-install.sh b/win32/djvulibre/djvulibre-install.sh
+index 75ee3f7..abe7b01 100755
+--- a/win32/djvulibre/djvulibre-install.sh
++++ b/win32/djvulibre/djvulibre-install.sh
+@@ -26,7 +26,7 @@ djdll="libdjvulibre.dll libjpeg.dll libtiff.dll libz.dll"
+ for n in $djdll $djexe ; do
+ run cp $dwdir/$n $target ; done
+
+-qtdll="QtCore4.dll QtGui4.dll QtNetwork4.dll"
++qtdll="QtCore4.dll QtGui4.dll QtNetwork4.dll QtOpenGL4.dll"
+ qtssl="ssleay32.dll libeay32.dll libssl32.dll"
+ qtplug="accessible codecs imageformats"
+ for n in $qtdll ; do
+diff --git a/win32/djvulibre/djvulibre.nsi b/win32/djvulibre/djvulibre.nsi
+index 8613e24..df2fd65 100755
+--- a/win32/djvulibre/djvulibre.nsi
++++ b/win32/djvulibre/djvulibre.nsi
+@@ -2,7 +2,7 @@
+
+ ; HM NIS Edit Wizard helper defines
+ !define PRODUCT_NAME "DjVuLibre+DjView"
+-!define PRODUCT_VERSION "3.5.25.3+4.9"
++!define PRODUCT_VERSION "3.5.25.3+4.9.1"
+ !define PRODUCT_PUBLISHER "DjVuZone"
+ !define PRODUCT_WEB_SITE "http://djvu.sourceforge.net"
+ !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\djview.exe"
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0072-handle-period-in-crlf-files-as-well.patch b/l/djvulibre/patches/0072-handle-period-in-crlf-files-as-well.patch
new file mode 100644
index 0000000..49af4b5
--- /dev/null
+++ b/l/djvulibre/patches/0072-handle-period-in-crlf-files-as-well.patch
@@ -0,0 +1,35 @@
+From 8fd027ffdcc411751cc1010f312470df8498be23 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Mon, 15 Apr 2013 22:13:44 -0400
+Subject: [PATCH 072/117] handle period in crlf files as well
+
+---
+ tools/djvused.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/djvused.cpp b/tools/djvused.cpp
+index c739418..d9259d9 100644
+--- a/tools/djvused.cpp
++++ b/tools/djvused.cpp
+@@ -396,7 +396,8 @@ get_data_from_file(const char *cmd, ParsingByteStream &pbs, ByteStream &out)
+ int c = pbs.get_spaces(true);
+ pbs.unget(c);
+ char skip[4];
+- char term[4] = "\n.\n";
++ char term0[4] = "\n.\n";
++ char term1[4] = "\r.\r";
+ char *s = skip;
+ int state = 1;
+ while (state < 3)
+@@ -404,7 +405,7 @@ get_data_from_file(const char *cmd, ParsingByteStream &pbs, ByteStream &out)
+ c = pbs.get();
+ if (c == EOF)
+ break;
+- if ( c == term[state] )
++ if ( c == term0[state] || c == term1[state] )
+ {
+ state += 1;
+ *s++ = c;
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0077-fix-for-filename-conversion.patch b/l/djvulibre/patches/0077-fix-for-filename-conversion.patch
new file mode 100644
index 0000000..84f7930
--- /dev/null
+++ b/l/djvulibre/patches/0077-fix-for-filename-conversion.patch
@@ -0,0 +1,39 @@
+From eeed42ae84262fee0234c883f8be0ce1983e5499 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Sat, 18 May 2013 09:50:10 -0800
+Subject: [PATCH 077/117] fix for filename conversion
+
+---
+ libdjvu/GURL.cpp | 2 +-
+ tools/djvused.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libdjvu/GURL.cpp b/libdjvu/GURL.cpp
+index a80078c..116af52 100644
+--- a/libdjvu/GURL.cpp
++++ b/libdjvu/GURL.cpp
+@@ -484,7 +484,7 @@ GURL::protocol(const GUTF8String& url)
+ const char * const url_ptr=url;
+ const char * ptr=url_ptr;
+ for(char c=*ptr;
+- c && (isalnum(c) || c == '+' || c == '-' || c == '.');
++ c && isascii(c) && (isalnum(c) || c == '+' || c == '-' || c == '.');
+ c=*(++ptr)) EMPTY_LOOP;
+ if (ptr[0]==colon && ptr[1]=='/' && ptr[2]=='/')
+ return GUTF8String(url_ptr, ptr-url_ptr);
+diff --git a/tools/djvused.cpp b/tools/djvused.cpp
+index d9259d9..31ab6e6 100644
+--- a/tools/djvused.cpp
++++ b/tools/djvused.cpp
+@@ -2213,7 +2213,7 @@ main(int argc, char **argv)
+ else if (!strcmp(argv[i],"-u"))
+ utf8 = true;
+ else if (!strcmp(argv[i],"-f") && i+1<argc && !g().cmdbs)
+- g().cmdbs = ByteStream::create(GURL::Filename::UTF8(argv[++i]), "r");
++ g().cmdbs = ByteStream::create(GURL::Filename::UTF8(GNativeString(argv[++i])), "r");
+ else if (!strcmp(argv[i],"-e") && !g().cmdbs && ++i<argc)
+ g().cmdbs = ByteStream::create_static(argv[i],strlen(argv[i]));
+ else if (argv[i][0] != '-' && !g().djvufile)
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0079-locale-changes-for-win32.patch b/l/djvulibre/patches/0079-locale-changes-for-win32.patch
new file mode 100644
index 0000000..0f8e5ed
--- /dev/null
+++ b/l/djvulibre/patches/0079-locale-changes-for-win32.patch
@@ -0,0 +1,36 @@
+From 51c730048ab00c91423a65419b6bb3db35925eab Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Mon, 20 May 2013 18:25:43 -0800
+Subject: [PATCH 079/117] locale changes for win32
+
+---
+ tools/djvused.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/tools/djvused.cpp b/tools/djvused.cpp
+index 31ab6e6..25b8a89 100644
+--- a/tools/djvused.cpp
++++ b/tools/djvused.cpp
+@@ -66,6 +66,9 @@
+ #include <stdarg.h>
+ #include <errno.h>
+ #include <locale.h>
++#ifdef WIN32
++# include <mbctype.h>
++#endif
+
+ #include "IW44Image.h"
+ #include "GOS.h"
+@@ -2200,6 +2203,9 @@ main(int argc, char **argv)
+ setlocale(LC_ALL,"");
+ setlocale(LC_NUMERIC,"C");
+ djvu_programname(argv[0]);
++#ifdef WIN32
++ _setmbcp(_MB_CP_OEM);
++#endif
+ G_TRY
+ {
+ { // extra nesting for windows
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0088-fixed-trivial-crash.patch b/l/djvulibre/patches/0088-fixed-trivial-crash.patch
new file mode 100644
index 0000000..a928a30
--- /dev/null
+++ b/l/djvulibre/patches/0088-fixed-trivial-crash.patch
@@ -0,0 +1,25 @@
+From 7e18bc0abf958066f736b2dea936d8dbf89dd5f3 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Thu, 27 Jun 2013 07:56:05 -0400
+Subject: [PATCH 088/117] fixed trivial crash
+
+---
+ tools/djvused.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/djvused.cpp b/tools/djvused.cpp
+index 7f9b4ef..66f8821 100644
+--- a/tools/djvused.cpp
++++ b/tools/djvused.cpp
+@@ -2286,7 +2286,7 @@ main(int argc, char **argv)
+ utf8 = true;
+ else if (!strcmp(argv[i],"-f") && i+1<argc && !g().cmdbs)
+ g().cmdbs = ByteStream::create(GURL::Filename::UTF8(GNativeString(argv[++i])), "r");
+- else if (!strcmp(argv[i],"-e") && !g().cmdbs && ++i<argc)
++ else if (!strcmp(argv[i],"-e") && !g().cmdbs && i+1<argc && ++i)
+ g().cmdbs = ByteStream::create_static(argv[i],strlen(argv[i]));
+ else if (argv[i][0] != '-' && !g().djvufile)
+ g().djvufile = GNativeString(argv[i]);
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0094-meta-data-metadata.patch b/l/djvulibre/patches/0094-meta-data-metadata.patch
new file mode 100644
index 0000000..82d447d
--- /dev/null
+++ b/l/djvulibre/patches/0094-meta-data-metadata.patch
@@ -0,0 +1,59 @@
+From f794f2d6dfbdc3799a190fb6f76f2bc353098e78 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Mon, 16 Sep 2013 09:31:49 -0400
+Subject: [PATCH 094/117] meta-data --> metadata.
+
+---
+ tools/djvused.1 | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/tools/djvused.1 b/tools/djvused.1
+index 4c919c6..bcb1621 100644
+--- a/tools/djvused.1
++++ b/tools/djvused.1
+@@ -372,27 +372,27 @@ with option
+ .BR -f .
+ .TP
+ .BI "print-meta"
+-Print the meta-data part of the annotations for the selected component file.
++Print the metadata part of the annotations for the selected component file.
+ This command displays a subset of the information printed by command
+ .B print-ant
+-using a different syntax. Meta-data are organized as key\-value pairs.
++using a different syntax. metadata are organized as key\-value pairs.
+ Each printed line contains the key name such as
+ .BR "author" ", " "title" ",etc.,"
+ followed by a tab character ("\\t") and
+ a double-quoted string representing the
+ .SM UTF-8
+-encoded meta-data value.
++encoded metadata value.
+ .TP
+ .BI "remove-meta"
+-Remove the meta-data part of the annotations of
++Remove the metadata part of the annotations of
+ the selected component files.
+ .TP
+ .BI "set-meta [" "djvusedmetafile" "]"
+-Set the meta-data part of the annotations of the selected component file.
++Set the metadata part of the annotations of the selected component file.
+ The remaining part of the annotations is left unchanged.
+ The optional argument
+ .I djvusedmetafile
+-names a file containing the meta-data.
++names a file containing the metadata.
+ This file must contain data similar to what is produced
+ by command
+ .BR print-meta .
+@@ -886,7 +886,7 @@ Clicking the icon reveals the text.
+ .RE
+ .TP
+ .BI "(metadata ... (" key " " value ") ... )"
+-Define meta-data entries.
++Define metadata entries.
+ Each entry is identified by a symbol
+ .I key
+ representing the nature of the meta data entry.
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0105-Fixed-small-bugs-from-Maks.patch b/l/djvulibre/patches/0105-Fixed-small-bugs-from-Maks.patch
new file mode 100644
index 0000000..9408ea1
--- /dev/null
+++ b/l/djvulibre/patches/0105-Fixed-small-bugs-from-Maks.patch
@@ -0,0 +1,69 @@
+From 221f3c250387eecbd2bf4aa954ae2f03994d1994 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Sun, 6 Apr 2014 12:19:01 -0400
+Subject: [PATCH 105/117] Fixed small bugs from Maks
+
+---
+ libdjvu/DjVuDumpHelper.cpp | 2 +-
+ libdjvu/DjVuFile.cpp | 2 +-
+ libdjvu/GUnicode.cpp | 2 +-
+ libdjvu/ddjvuapi.cpp | 4 ++--
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/libdjvu/DjVuDumpHelper.cpp b/libdjvu/DjVuDumpHelper.cpp
+index de19845..ef69bb6 100644
+--- a/libdjvu/DjVuDumpHelper.cpp
++++ b/libdjvu/DjVuDumpHelper.cpp
+@@ -106,7 +106,7 @@ display_djvu_info(ByteStream & out_str, IFFByteStream &iff,
+ out_str.format( ", v%d", info.version);
+ if (size >= 8)
+ out_str.format( ", %d dpi", info.dpi);
+- if (size >= 8)
++ if (size >= 9)
+ out_str.format( ", gamma=%3.1f", info.gamma);
+ }
+
+diff --git a/libdjvu/DjVuFile.cpp b/libdjvu/DjVuFile.cpp
+index e8abce0..eea3404 100644
+--- a/libdjvu/DjVuFile.cpp
++++ b/libdjvu/DjVuFile.cpp
+@@ -983,7 +983,7 @@ DjVuFile::decode_chunk( const GUTF8String &id, const GP<ByteStream> &gbs,
+ }
+
+ // FG44 (foreground wavelets)
+- else if (chkid == "FG44" && (djvu || djvu))
++ else if (chkid == "FG44" && (djvu || djvi))
+ {
+ if (fgpm || fgbc)
+ G_THROW( ERR_MSG("DjVuFile.dupl_foregrnd") );
+diff --git a/libdjvu/GUnicode.cpp b/libdjvu/GUnicode.cpp
+index ca6f9f0..d305483 100644
+--- a/libdjvu/GUnicode.cpp
++++ b/libdjvu/GUnicode.cpp
+@@ -307,7 +307,7 @@ GStringRep::Unicode::create(
+ {
+ retval=create(xbuf,bufsize,XUTF8);
+ }else if(!e->cmp("UTF16")|| !e->cmp("UTF-16")
+- || !e->cmp("UCS2") || !e->cmp("UCS2"))
++ || !e->cmp("UCS2") || !e->cmp("UCS-2"))
+ {
+ retval=create(xbuf,bufsize,XUTF16);
+ }else if(!e->cmp("UCS4") || !e->cmp("UCS-4"))
+diff --git a/libdjvu/ddjvuapi.cpp b/libdjvu/ddjvuapi.cpp
+index 5a6904f..b6ceedb 100644
+--- a/libdjvu/ddjvuapi.cpp
++++ b/libdjvu/ddjvuapi.cpp
+@@ -3120,8 +3120,8 @@ ddjvu_savejob_s::notify_file_flags_changed(const DjVuFile *file,
+ long mask, long)
+ {
+ if (mask & (DjVuFile::ALL_DATA_PRESENT | DjVuFile::DATA_PRESENT |
+- DjVuFile::DECODE_FAILED | DjVuFile::DECODE_STOPPED |
+- DjVuFile::STOPPED | DjVuFile::DECODE_STOPPED ))
++ DjVuFile::DECODE_FAILED | DjVuFile::DECODE_STOPPED |
++ DjVuFile::STOPPED ))
+ {
+ GMonitorLock lock(&monitor);
+ monitor.signal();
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0107-Added-the-magic-win32-dll-option-in-LT_INIT-see-bug-.patch b/l/djvulibre/patches/0107-Added-the-magic-win32-dll-option-in-LT_INIT-see-bug-.patch
new file mode 100644
index 0000000..c981622
--- /dev/null
+++ b/l/djvulibre/patches/0107-Added-the-magic-win32-dll-option-in-LT_INIT-see-bug-.patch
@@ -0,0 +1,30 @@
+From fddde05ab7d3f6f90e0fb7c7691ed7d5bb6ddb15 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Sun, 6 Apr 2014 15:07:10 -0400
+Subject: [PATCH 107/117] Added the magic win32-dll option in LT_INIT (see bug
+ 224)
+
+diff --git a/configure.ac b/configure.ac
+index 9dcf8d1..da87853 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,7 +71,6 @@ AC_SUBST(DLLFLAGS)
+ case "$host" in
+ *-mingw32)
+ DLLFLAGS="$DLLFLAGS -Wl,--export-all-symbols"
+- LIBS=-lmsvcp60
+ ;;
+ *-darwin* | *-macos10*)
+ if test -d /opt/local ; then
+@@ -109,7 +108,7 @@ RM="$RM -f"
+
+ # Libtool & Compilers
+ AC_DISABLE_STATIC
+-LT_INIT
++LT_INIT([win32-dll])
+ AC_PROG_CC
+ AC_PROG_CXX
+ AC_SUBST(LIBTOOL_DEPS)
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0108-Cast-pointers-to-size_t-instead-of-unsigned-long.patch b/l/djvulibre/patches/0108-Cast-pointers-to-size_t-instead-of-unsigned-long.patch
new file mode 100644
index 0000000..6b2aee5
--- /dev/null
+++ b/l/djvulibre/patches/0108-Cast-pointers-to-size_t-instead-of-unsigned-long.patch
@@ -0,0 +1,123 @@
+From a5400f2c0ce00655e56d257f6426373f5af09895 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Sun, 6 Apr 2014 15:31:17 -0400
+Subject: [PATCH 108/117] Cast pointers to size_t instead of unsigned long
+
+---
+ libdjvu/DjVuPort.cpp | 8 ++++----
+ libdjvu/GBitmap.cpp | 2 +-
+ libdjvu/GContainer.h | 2 +-
+ libdjvu/IW44EncodeCodec.cpp | 4 ++--
+ libdjvu/IW44Image.cpp | 6 +++---
+ 5 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/libdjvu/DjVuPort.cpp b/libdjvu/DjVuPort.cpp
+index b02fa30..926b4b9 100644
+--- a/libdjvu/DjVuPort.cpp
++++ b/libdjvu/DjVuPort.cpp
+@@ -430,7 +430,7 @@ DjVuPortcaster::add_to_closure(GMap<const void *, void *> & set,
+ {
+ // Assuming that the map's already locked
+ // GCriticalSectionLock lock(&map_lock);
+- set[dst]= (void*) (unsigned long) distance;
++ set[dst]= (void*) (size_t) distance;
+ if (route_map.contains(dst))
+ {
+ GList<void *> & list=*(GList<void *> *) route_map[dst];
+@@ -466,11 +466,11 @@ DjVuPortcaster::compute_closure(const DjVuPort * src, GPList<DjVuPort> &list, bo
+ // Sort in depth order
+ int max_dist=0;
+ for(pos=set;pos;++pos)
+- if (max_dist < (int)(long)set[pos])
+- max_dist = (int)(long)set[pos];
++ if (max_dist < (int)(size_t)set[pos])
++ max_dist = (int)(size_t)set[pos];
+ GArray<GList<const void*> > lists(0,max_dist);
+ for(pos=set;pos;++pos)
+- lists[(int)(long)set[pos]].append(set.key(pos));
++ lists[(int)(size_t)set[pos]].append(set.key(pos));
+ for(int dist=0;dist<=max_dist;dist++)
+ for(pos=lists[dist];pos;++pos)
+ {
+diff --git a/libdjvu/GBitmap.cpp b/libdjvu/GBitmap.cpp
+index a4d8c64..80e4b94 100644
+--- a/libdjvu/GBitmap.cpp
++++ b/libdjvu/GBitmap.cpp
+@@ -469,7 +469,7 @@ GBitmap::share()
+ {
+ if (!monitorptr)
+ {
+- unsigned long x = (unsigned long)this;
++ size_t x = (size_t)this;
+ monitorptr = &monitors[(x^(x>>5)) % NMONITORS];
+ }
+ }
+diff --git a/libdjvu/GContainer.h b/libdjvu/GContainer.h
+index ef7681b..b5e9da4 100644
+--- a/libdjvu/GContainer.h
++++ b/libdjvu/GContainer.h
+@@ -178,7 +178,7 @@ hash(const unsigned long & x)
+ static inline unsigned int
+ hash(const void * const & x)
+ {
+- return (unsigned long) x;
++ return (unsigned int)(size_t) x;
+ }
+
+ /** Hashing function (float). */
+diff --git a/libdjvu/IW44EncodeCodec.cpp b/libdjvu/IW44EncodeCodec.cpp
+index 49081b7..d45bce9 100644
+--- a/libdjvu/IW44EncodeCodec.cpp
++++ b/libdjvu/IW44EncodeCodec.cpp
+@@ -310,7 +310,7 @@ static const int d16[] = {16,16};
+ static inline void
+ mmx_fv_1 ( short* &q, short* e, int s, int s3 )
+ {
+- while (q<e && (((long)q)&0x7))
++ while (q<e && (((size_t)q)&0x7))
+ {
+ int a = (int)q[-s] + (int)q[s];
+ int b = (int)q[-s3] + (int)q[s3];
+@@ -353,7 +353,7 @@ mmx_fv_1 ( short* &q, short* e, int s, int s3 )
+ static inline void
+ mmx_fv_2 ( short* &q, short* e, int s, int s3 )
+ {
+- while (q<e && (((long)q)&0x7))
++ while (q<e && (((size_t)q)&0x7))
+ {
+ int a = (int)q[-s] + (int)q[s];
+ int b = (int)q[-s3] + (int)q[s3];
+diff --git a/libdjvu/IW44Image.cpp b/libdjvu/IW44Image.cpp
+index 4a19fb5..ed3d7b2 100644
+--- a/libdjvu/IW44Image.cpp
++++ b/libdjvu/IW44Image.cpp
+@@ -167,7 +167,7 @@ static const int d16[] = {16,16};
+ static void
+ mmx_bv_1 ( short* &q, short* e, int s, int s3 )
+ {
+- while (q<e && (((long)q)&0x7))
++ while (q<e && (((size_t)q)&0x7))
+ {
+ int a = (int)q[-s] + (int)q[s];
+ int b = (int)q[-s3] + (int)q[s3];
+@@ -211,7 +211,7 @@ mmx_bv_1 ( short* &q, short* e, int s, int s3 )
+ static void
+ mmx_bv_2 ( short* &q, short* e, int s, int s3 )
+ {
+- while (q<e && (((long)q)&0x7))
++ while (q<e && (((size_t)q)&0x7))
+ {
+ int a = (int)q[-s] + (int)q[s];
+ int b = (int)q[-s3] + (int)q[s3];
+@@ -649,7 +649,7 @@ IW44Image::Map::allocp(int n)
+ // Allocate enough room for pointers plus alignment
+ short *p = alloc( (n+1) * sizeof(short*) / sizeof(short) );
+ // Align on pointer size
+- while ( ((long)p) & (sizeof(short*)-1) )
++ while ( ((size_t)p) & (sizeof(short*)-1) )
+ p += 1;
+ // Cast and return
+ return (short**)p;
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0109-Added-code-to-define-inline-when-using-C.patch b/l/djvulibre/patches/0109-Added-code-to-define-inline-when-using-C.patch
new file mode 100644
index 0000000..19d3b90
--- /dev/null
+++ b/l/djvulibre/patches/0109-Added-code-to-define-inline-when-using-C.patch
@@ -0,0 +1,35 @@
+From 809342b7ce516ddbdcf6a4b6ee66abd2f0764da7 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Sun, 4 May 2014 20:51:01 -0400
+Subject: [PATCH 109/117] Added code to define "inline" when using C.
+
+---
+ libdjvu/miniexp.h | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/libdjvu/miniexp.h b/libdjvu/miniexp.h
+index 1160baf..570ee62 100644
+--- a/libdjvu/miniexp.h
++++ b/libdjvu/miniexp.h
+@@ -39,6 +39,18 @@ extern "C" {
+ # define MINILISPAPI /**/
+ #endif
+
++#ifndef __cplusplus
++# ifndef inline
++# if defined(__GNUC__)
++# define inline __inline__
++# elif defined(_MSC_VER)
++# define inline __inline
++# else
++# define inline /**/
++# endif
++# endif
++#endif
++
+ #include <stddef.h>
+
+ /* -------------------------------------------------- */
+--
+1.8.4
+
diff --git a/l/djvulibre/patches/0115-Fixed-clang-warnings.patch b/l/djvulibre/patches/0115-Fixed-clang-warnings.patch
new file mode 100644
index 0000000..e841230
--- /dev/null
+++ b/l/djvulibre/patches/0115-Fixed-clang-warnings.patch
@@ -0,0 +1,213 @@
+From 308a3a10d5a027882c3ba80fd2d9087d2a63d099 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Thu, 22 May 2014 09:47:57 -0400
+Subject: [PATCH 115/117] Fixed clang warnings
+
+---
+ libdjvu/DjVuToPS.cpp | 4 ++--
+ libdjvu/GString.cpp | 9 ++++++---
+ libdjvu/ddjvuapi.cpp | 24 ++++++++++++------------
+ tools/c44.cpp | 2 +-
+ tools/tiff2pdf.c | 2 +-
+ 5 files changed, 22 insertions(+), 19 deletions(-)
+
+diff --git a/libdjvu/DjVuToPS.cpp b/libdjvu/DjVuToPS.cpp
+index 6914ff9..f72a4c9 100644
+--- a/libdjvu/DjVuToPS.cpp
++++ b/libdjvu/DjVuToPS.cpp
+@@ -2210,7 +2210,7 @@ public:
+ double decode_done;
+ GURL decode_page_url;
+ virtual void notify_file_flags_changed(const DjVuFile*,long,long);
+- virtual void notify_decode_progress(const DjVuPort*,double);
++ virtual void notify_decode_progress(const DjVuPort*,float);
+ };
+
+ DjVuToPS::DecodePort::
+@@ -2247,7 +2247,7 @@ notify_file_flags_changed(const DjVuFile *source,
+
+ void
+ DjVuToPS::DecodePort::
+-notify_decode_progress(const DjVuPort *source, double done)
++notify_decode_progress(const DjVuPort *source, float done)
+ {
+ // WARNING! This function is called from another thread
+ if (source->inherits("DjVuFile"))
+diff --git a/libdjvu/GString.cpp b/libdjvu/GString.cpp
+index caf2415..a232540 100644
+--- a/libdjvu/GString.cpp
++++ b/libdjvu/GString.cpp
+@@ -2259,8 +2259,9 @@ GStringRep::UTF8::toLong(
+ endpos=edata-data;
+ }else
+ {
++ GP<GStringRep> ptr = GStringRep::UTF8::create();
+ endpos=(-1);
+- GP<GStringRep> ptr=ptr->strdup(data+pos);
++ ptr=ptr->strdup(data+pos);
+ if(ptr)
+ ptr=ptr->toNative(NOT_ESCAPED);
+ if(ptr)
+@@ -2304,8 +2305,9 @@ GStringRep::UTF8::toULong(
+ endpos=edata-data;
+ }else
+ {
++ GP<GStringRep> ptr = GStringRep::UTF8::create();
+ endpos=(-1);
+- GP<GStringRep> ptr=ptr->strdup(data+pos);
++ ptr=ptr->strdup(data+pos);
+ if(ptr)
+ ptr=ptr->toNative(NOT_ESCAPED);
+ if(ptr)
+@@ -2348,8 +2350,9 @@ GStringRep::UTF8::toDouble(const int pos, int &endpos) const
+ endpos=edata-data;
+ }else
+ {
++ GP<GStringRep> ptr = GStringRep::UTF8::create();
+ endpos=(-1);
+- GP<GStringRep> ptr=ptr->strdup(data+pos);
++ ptr=ptr->strdup(data+pos);
+ if(ptr)
+ ptr=ptr->toNative(NOT_ESCAPED);
+ if(ptr)
+diff --git a/libdjvu/ddjvuapi.cpp b/libdjvu/ddjvuapi.cpp
+index b6ceedb..ff0c3cc 100644
+--- a/libdjvu/ddjvuapi.cpp
++++ b/libdjvu/ddjvuapi.cpp
+@@ -167,7 +167,7 @@ struct DJVUNS ddjvu_job_s : public DjVuPort
+ bool released;
+ ddjvu_job_s();
+ // virtual port functions:
+- virtual bool inherits(const GUTF8String&);
++ virtual bool inherits(const GUTF8String&) const;
+ virtual bool notify_error(const DjVuPort*, const GUTF8String&);
+ virtual bool notify_status(const DjVuPort*, const GUTF8String&);
+ // default implementation of virtual job functions:
+@@ -192,7 +192,7 @@ struct DJVUNS ddjvu_document_s : public ddjvu_job_s
+ virtual ddjvu_status_t status();
+ virtual void release();
+ // virtual port functions:
+- virtual bool inherits(const GUTF8String&);
++ virtual bool inherits(const GUTF8String&) const;
+ virtual bool notify_error(const DjVuPort*, const GUTF8String&);
+ virtual bool notify_status(const DjVuPort*, const GUTF8String&);
+ virtual void notify_doc_flags_changed(const DjVuDocument*, long, long);
+@@ -211,7 +211,7 @@ struct DJVUNS ddjvu_page_s : public ddjvu_job_s
+ virtual ddjvu_status_t status();
+ virtual void release();
+ // virtual port functions:
+- virtual bool inherits(const GUTF8String&);
++ virtual bool inherits(const GUTF8String&) const;
+ virtual bool notify_error(const DjVuPort*, const GUTF8String&);
+ virtual bool notify_status(const DjVuPort*, const GUTF8String&);
+ virtual void notify_file_flags_changed(const DjVuFile*, long, long);
+@@ -580,7 +580,7 @@ ddjvu_job_s::ddjvu_job_s()
+ }
+
+ bool
+-ddjvu_job_s::inherits(const GUTF8String &classname)
++ddjvu_job_s::inherits(const GUTF8String &classname) const
+ {
+ return (classname == "ddjvu_job_s")
+ || DjVuPort::inherits(classname);
+@@ -810,7 +810,7 @@ ddjvu_document_s::status()
+ }
+
+ bool
+-ddjvu_document_s::inherits(const GUTF8String &classname)
++ddjvu_document_s::inherits(const GUTF8String &classname) const
+ {
+ return (classname == "ddjvu_document_s")
+ || ddjvu_job_s::inherits(classname);
+@@ -1639,7 +1639,7 @@ ddjvu_page_s::status()
+ }
+
+ bool
+-ddjvu_page_s::inherits(const GUTF8String &classname)
++ddjvu_page_s::inherits(const GUTF8String &classname) const
+ {
+ return (classname == "ddjvu_page_s")
+ || ddjvu_job_s::inherits(classname);
+@@ -2653,7 +2653,7 @@ struct DJVUNS ddjvu_runnablejob_s : public ddjvu_job_s
+ // thread function
+ virtual ddjvu_status_t run() = 0;
+ // virtual port functions:
+- virtual bool inherits(const GUTF8String&);
++ virtual bool inherits(const GUTF8String&) const;
+ virtual ddjvu_status_t status();
+ virtual void stop();
+ private:
+@@ -2734,7 +2734,7 @@ ddjvu_runnablejob_s::cbstart(void *arg)
+ }
+
+ bool
+-ddjvu_runnablejob_s::inherits(const GUTF8String &classname)
++ddjvu_runnablejob_s::inherits(const GUTF8String &classname) const
+ {
+ return (classname == "ddjvu_runnablejob_s")
+ || ddjvu_job_s::inherits(classname);
+@@ -2763,7 +2763,7 @@ struct DJVUNS ddjvu_printjob_s : public ddjvu_runnablejob_s
+ GP<ByteStream> obs;
+ virtual ddjvu_status_t run();
+ // virtual port functions:
+- virtual bool inherits(const GUTF8String&);
++ virtual bool inherits(const GUTF8String&) const;
+ // progress
+ static void cbrefresh(void*);
+ static void cbprogress(double, void*);
+@@ -2773,7 +2773,7 @@ struct DJVUNS ddjvu_printjob_s : public ddjvu_runnablejob_s
+ };
+
+ bool
+-ddjvu_printjob_s::inherits(const GUTF8String &classname)
++ddjvu_printjob_s::inherits(const GUTF8String &classname) const
+ {
+ return (classname == "ddjvu_printjob_s")
+ || ddjvu_runnablejob_s::inherits(classname);
+@@ -3101,7 +3101,7 @@ struct DJVUNS ddjvu_savejob_s : public ddjvu_runnablejob_s
+ // thread routine
+ virtual ddjvu_status_t run();
+ // virtual port functions:
+- virtual bool inherits(const GUTF8String&);
++ virtual bool inherits(const GUTF8String&) const;
+ virtual void notify_file_flags_changed(const DjVuFile*, long, long);
+ // helpers
+ bool parse_pagespec(const char *s, int npages, bool *flags);
+@@ -3109,7 +3109,7 @@ struct DJVUNS ddjvu_savejob_s : public ddjvu_runnablejob_s
+ };
+
+ bool
+-ddjvu_savejob_s::inherits(const GUTF8String &classname)
++ddjvu_savejob_s::inherits(const GUTF8String &classname) const
+ {
+ return (classname == "ddjvu_savejob_s")
+ || ddjvu_runnablejob_s::inherits(classname);
+diff --git a/tools/c44.cpp b/tools/c44.cpp
+index d3fc515..60be497 100644
+--- a/tools/c44.cpp
++++ b/tools/c44.cpp
+@@ -696,7 +696,7 @@ main(int argc, char **argv)
+ ByteStream &ibs=*gibs;
+ char prefix[16];
+ memset(prefix, 0, sizeof(prefix));
+- if (ibs.read((void*)prefix, sizeof(prefix)) < 0)
++ if (ibs.readall((void*)prefix, sizeof(prefix)) < sizeof(prefix))
+ G_THROW( ERR_MSG("c44.failed_pnm_header") );
+ #ifdef DEFAULT_JPEG_TO_HALF_SIZE
+ // Default specification for jpeg files
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index dc23f19..0367578 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -3527,7 +3527,7 @@ static void t2p_tile_collapse_left(
+ tsize_t edgescanwidth=0;
+
+ edgescanwidth = (scanwidth * edgetilewidth + (tilewidth - 1))/ tilewidth;
+- for(i=i;i<tilelength;i++){
++ for(i=0;i<tilelength;i++){
+ _TIFFmemcpy(
+ &(((char*)buffer)[edgescanwidth*i]),
+ &(((char*)buffer)[scanwidth*i]),
+--
+1.8.4
+
diff --git a/l/expat/config-regular b/l/expat/config-regular
new file mode 100644
index 0000000..6844c64
--- /dev/null
+++ b/l/expat/config-regular
@@ -0,0 +1 @@
+export DISABLE_STATIC="--disable-static"
diff --git a/l/expat/config-yypkg b/l/expat/config-yypkg
new file mode 100644
index 0000000..d52db38
--- /dev/null
+++ b/l/expat/config-yypkg
@@ -0,0 +1 @@
+export DISABLE_STATIC="--disable-shared --enable-static"
diff --git a/l/expat/expat.SlackBuild b/l/expat/expat.SlackBuild
index 87f1462..e660cbe 100755
--- a/l/expat/expat.SlackBuild
+++ b/l/expat/expat.SlackBuild
@@ -34,20 +34,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-expat
@@ -62,26 +48,38 @@ cd expat-$VERSION
chown -R root:root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 664 -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --host=${HOST_TRIPLET} \
+ ${DISABLE_STATIC} \
--mandir=/usr/man \
--build=$ARCH-slackware-linux
make -j4 || exit 1
make install DESTDIR=$PKG
+
+# !PATCH
+case "${HOST_TRIPLET}" in
+ *-*-mingw*) mv "$PKG/${PREFIX}/bin/xmlwf" "$PKG/${PREFIX}/bin/xmlwf.exe" ;;
+esac
+
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | egrep "executable|shared object" | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
)
-mkdir -p $PKG/usr/doc/expat-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/expat-$VERSION
cp -a \
COPYING* Changes README* doc/reference.html \
- $PKG/usr/doc/expat-$VERSION
-gzip -9 $PKG/usr/man/man?/*.?
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+ $PKG/${PREFIX}/doc/expat-$VERSION
+gzip -9 $PKG/${PREFIX}/man/man?/*.?
-cd $PKG
-makepkg -l y -c n $TMP/expat-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/expat/expat.yypkg.script b/l/expat/expat.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/expat/expat.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/freetype/config-regular b/l/freetype/config-regular
new file mode 100644
index 0000000..bb284d2
--- /dev/null
+++ b/l/freetype/config-regular
@@ -0,0 +1,2 @@
+export WITHOUT_PNG=""
+export DISABLE_STATIC="--disable-static"
diff --git a/l/freetype/config-yypkg b/l/freetype/config-yypkg
new file mode 100644
index 0000000..d2e2d8e
--- /dev/null
+++ b/l/freetype/config-yypkg
@@ -0,0 +1,2 @@
+export WITHOUT_PNG="--without-png"
+export DISABLE_STATIC="--disable-shared --enable-static"
diff --git a/l/freetype/freetype.SlackBuild b/l/freetype/freetype.SlackBuild
index 820562b..1084fa5 100755
--- a/l/freetype/freetype.SlackBuild
+++ b/l/freetype/freetype.SlackBuild
@@ -37,20 +37,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-freetype
@@ -81,40 +67,36 @@ zcat $CWD/freetype.illadvisederror.diff.gz | patch -p1 --verbose || exit 1
#zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
chown -R root:root .
-CFLAGS="$SLKCFLAGS" make setup CFG="--prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --build=$ARCH-slackware-linux"
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
+ LIBPNG_CFLAGS="$(pkg-config --cflags libpng)" \
+ LIBPNG_LDFLAGS="$(pkg-config --libs libpng)" \
+ make \
+ CFG="--prefix=/${PREFIX} --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} --build=$ARCH-slackware-linux --host=${HOST_TRIPLET} ${WITHOUT_PNG} ${DISABLE_STATIC}"
+
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG
-# This shouldn't be needed (apps should pick up -I/usr/include/freetype2 from
-# `freetype-config --cflags` while compiling), but it's so often reported as
-# a bug that I'll give in to the point. Now that Freetype1 is pretty much gone
-# having this link shouldn't hurt anything. Try not to rely on it, though.
-mkdir -p $PKG/usr/include
-( cd $PKG/usr/include
- rm -rf freetype
- ln -sf freetype2 freetype
-)
-
-# Can't imagine a lot of use for this:
-rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+find $PKG | xargs file | egrep "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+mv $PKG/${PREFIX}/share/man $PKG/${PREFIX}/man
+find $PKG/${PREFIX}/man -type f -exec gzip -9 {} \;
-mv $PKG/usr/share/man $PKG/usr/man
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-
-mkdir -p $PKG/usr/doc/freetype-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/freetype-$VERSION
cp -a \
docs \
README \
- $PKG/usr/doc/freetype-$VERSION
+ $PKG/${PREFIX}/doc/freetype-$VERSION
# too much
-rm -rf $PKG/usr/doc/freetype-$VERSION/docs/reference
-
-mkdir $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/freetype-$VERSION-$ARCH-$BUILD.txz
+rm -rf $PKG/${PREFIX}/doc/freetype-$VERSION/docs/reference
+
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/freetype/freetype.yypkg.script b/l/freetype/freetype.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/freetype/freetype.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/fribidi/0001-benchmark-struct-tms-is-only-available-if-sys-times..patch b/l/fribidi/0001-benchmark-struct-tms-is-only-available-if-sys-times..patch
new file mode 100644
index 0000000..5bff150
--- /dev/null
+++ b/l/fribidi/0001-benchmark-struct-tms-is-only-available-if-sys-times..patch
@@ -0,0 +1,27 @@
+From 8a87bd65b2b145cf8333c5d5ad3325dfc33d589f Mon Sep 17 00:00:00 2001
+From: Adrien Nader <adrien@notk.org>
+Date: Tue, 4 Feb 2014 22:06:20 +0100
+Subject: [PATCH] benchmark: "struct tms" is only available if "sys/times.h"
+ is.
+
+---
+ bin/fribidi-benchmark.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bin/fribidi-benchmark.c b/bin/fribidi-benchmark.c
+index da4e1aa..629f213 100644
+--- a/bin/fribidi-benchmark.c
++++ b/bin/fribidi-benchmark.c
+@@ -123,8 +123,8 @@ utime (
+ void
+ )
+ {
+- struct tms tb;
+ #if HAVE_SYS_TIMES_H+0
++ struct tms tb;
+ times (&tb);
+ return 0.01 * tb.tms_utime;
+ #else
+--
+1.8.4
+
diff --git a/l/fribidi/fribidi.SlackBuild b/l/fribidi/fribidi.SlackBuild
index 0d42095..0e4d2cf 100755
--- a/l/fribidi/fribidi.SlackBuild
+++ b/l/fribidi/fribidi.SlackBuild
@@ -25,35 +25,13 @@ PKGNAM=fribidi
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-3}
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
- esac
-fi
-
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
+set -e
CWD=$(pwd)
TMP=${TMP:-/tmp}
-PKG=/tmp/package-fribidi
+PKG=${TMP}/package-fribidi
rm -rf $PKG
mkdir -p $TMP $PKG
@@ -62,33 +40,34 @@ rm -rf fribidi-$VERSION
tar xvf $CWD/fribidi-$VERSION.tar.?z* || exit 1
cd fribidi-$VERSION
-zcat $CWD/fribidi.glib.h.diff.gz | patch -p1 --verbose || exit 1
-
chown -R root:root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 664 -exec chmod 644 {} \;
chown -R root:root .
-CFLAGS="$SLKCFLAGS" \
-./configure --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
+./configure --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
--disable-static \
+ --enable-malloc \
+ --without-glib \
+ --host=${HOST_TRIPLET} \
--with-pic
make $NUMJOBS || exit 1
make install DESTDIR=$PKG
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Remove any zero length man pages:
-find $PKG/usr/man/ -type f -empty -delete
+find $PKG/${PREFIX}/man/ -type f -empty -delete
# Compress and if needed symlink the man pages:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -101,13 +80,16 @@ if [ -d $PKG/usr/man ]; then
)
fi
-mkdir -p $PKG/usr/doc/fribidi-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/fribidi-$VERSION
cp -a \
AUTHORS COPYING* NEWS README* THANKS TODO \
- $PKG/usr/doc/fribidi-$VERSION
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-makepkg -l y -c n $TMP/fribidi-$VERSION-$ARCH-$BUILD.txz
-
+ $PKG/${PREFIX}/doc/fribidi-$VERSION
+
+cat ${CWD}/fribidi.yypkg.script | sed \
+ -e "s/%{PKG}/fribidi/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/fribidi/fribidi.yypkg.script b/l/fribidi/fribidi.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/fribidi/fribidi.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/gdk-pixbuf2/doinst.sh.gz b/l/gdk-pixbuf2/doinst.sh.gz
deleted file mode 100644
index 1c6f23e..0000000
--- a/l/gdk-pixbuf2/doinst.sh.gz
+++ /dev/null
Binary files differ
diff --git a/l/gdk-pixbuf2/gdk-pixbuf2.SlackBuild b/l/gdk-pixbuf2/gdk-pixbuf2.SlackBuild
index 7a53886..ce07486 100755
--- a/l/gdk-pixbuf2/gdk-pixbuf2.SlackBuild
+++ b/l/gdk-pixbuf2/gdk-pixbuf2.SlackBuild
@@ -41,20 +41,6 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -72,51 +58,39 @@ find . \
# and this patch is the workaround. ;-)
zcat $CWD/gdk-pixbuf.pnglz.diff.gz | patch -p1 || exit 1
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+# Upstream patch only available in an unstable version so far.
+patch -p0 --verbose < ${CWD}/lib-Prefer-our-own-loaders-to-the-GDI+-one.patch
+
+#! PATCH
+sed -i \
+ '/libdir = g_build_filename (\(_gdk_pixbuf_win32_\)\?get_toplevel (), "lib", NULL);/ s/"lib"/"lib'"${LIBDIRSUFFIX}"'"/' \
+ gdk-pixbuf/queryloaders.c \
+ gdk-pixbuf/gdk-pixbuf-io.c
+
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --enable-introspection \
- --with-x11 \
- --build=$ARCH-slackware-linux
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --localstatedir=/${PREFIX}/var \
+ --mandir=/${PREFIX}/man \
+ --docdir=/${PREFIX}/doc/$PKGNAM-$VERSION \
+ --disable-introspection \
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# We need to have separate 32-bit and 64-bit binaries
-# for places where we have two copies of the GTK+ package installed.
-# (we might have x86_64 and i486 packages on the same system, for example.)
-host="$ARCH-slackware-linux"
-case "$host" in
- s390x*|x86_64*)
- mv $PKG/usr/bin/gdk-pixbuf-query-loaders{,-64}
- ( cd $PKG/usr/bin
- ln -sf gdk-pixbuf-query-loaders-64 gdk-pixbuf-query-loaders
- )
- ;;
- *)
- mv $PKG/usr/bin/gdk-pixbuf-query-loaders{,-32}
- ( cd $PKG/usr/bin
- ln -sf gdk-pixbuf-query-loaders-32 gdk-pixbuf-query-loaders
- )
- ;;
-esac
-
-# Install wrappers for the binaries:
-cp $CWD/update-gdk-pixbuf-loaders $PKG/usr/bin/update-gdk-pixbuf-loaders
-chmod 0755 $PKG/usr/bin/update-gdk-pixbuf-loaders
-
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null || true
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -129,23 +103,25 @@ if [ -d $PKG/usr/man ]; then
)
fi
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* INSTALL NEWS README* \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/${PKGNAM}2-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/${PKGNAM}2.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}2/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/gdk-pixbuf2/gdk-pixbuf2.yypkg.script b/l/gdk-pixbuf2/gdk-pixbuf2.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/gdk-pixbuf2/gdk-pixbuf2.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/gdk-pixbuf2/lib-Prefer-our-own-loaders-to-the-GDI+-one.patch b/l/gdk-pixbuf2/lib-Prefer-our-own-loaders-to-the-GDI+-one.patch
new file mode 100644
index 0000000..834c0e8
--- /dev/null
+++ b/l/gdk-pixbuf2/lib-Prefer-our-own-loaders-to-the-GDI+-one.patch
@@ -0,0 +1,56 @@
+From d846e8e5f532ad823b30b2965f0c8558196d4d40 Mon Sep 17 00:00:00 2001
+From: Ignacio Casal Quinteiro <icq@gnome.org>
+Date: Wed, 3 Sep 2014 09:48:50 +0200
+Subject: lib: Prefer our own loaders to the GDI+ one
+
+Give priority to the modules using the open source libraries
+instead of gdip as GDI+ is known to be buggy, and not so well integrated
+into gdk-pixbuf.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=739077
+
+diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
+index 63a0299..dfc2c29 100644
+--- a/gdk-pixbuf/gdk-pixbuf-io.c
++++ b/gdk-pixbuf/gdk-pixbuf-io.c
+@@ -706,6 +706,18 @@ gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module,
+
+ try_module (pixdata,pixdata);
+
++#ifdef INCLUDE_gdiplus
++ try_module (ico,gdip_ico);
++ try_module (wmf,gdip_wmf);
++ try_module (emf,gdip_emf);
++ try_module (bmp,gdip_bmp);
++ try_module (gif,gdip_gif);
++ try_module (jpeg,gdip_jpeg);
++ try_module (tiff,gdip_tiff);
++#endif
++#ifdef INCLUDE_gdip_png
++ try_module (png,gdip_png);
++#endif
+ #ifdef INCLUDE_png
+ try_module (png,png);
+ #endif
+@@ -757,18 +769,6 @@ gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module,
+ #ifdef INCLUDE_qtif
+ try_module (qtif,qtif);
+ #endif
+-#ifdef INCLUDE_gdiplus
+- try_module (ico,gdip_ico);
+- try_module (wmf,gdip_wmf);
+- try_module (emf,gdip_emf);
+- try_module (bmp,gdip_bmp);
+- try_module (gif,gdip_gif);
+- try_module (jpeg,gdip_jpeg);
+- try_module (tiff,gdip_tiff);
+-#endif
+-#ifdef INCLUDE_gdip_png
+- try_module (png,gdip_png);
+-#endif
+
+ #undef try_module
+
+--
+cgit v0.10.1
+
diff --git a/l/giflib/giflib.SlackBuild b/l/giflib/giflib.SlackBuild
index e2390a2..8d5553c 100755
--- a/l/giflib/giflib.SlackBuild
+++ b/l/giflib/giflib.SlackBuild
@@ -35,24 +35,12 @@ if [ -z "$ARCH" ]; then
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-giflib
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -60,50 +48,49 @@ rm -rf giflib-$VERSION
tar xvf $CWD/giflib-$VERSION.tar.?z* || exit 1
cd giflib-$VERSION
chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+chmod -R u+w,go+r-w,a-s .
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
--with-x=no \
--disable-static \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux
+sed -i 's/libgif_la_LDFLAGS = -version-info 5:6:1/\0 -no-undefined/' lib/Makefile
+
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# Make some compatibility symlinks
-( cd $PKG/usr/lib${LIBDIRSUFFIX}
- ln -s libgif.so.4 libungif.so.4
- ln -s libgif.so libungif.so
-)
-
-mkdir -p $PKG/usr/doc/giflib-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/giflib-$VERSION
cp -a \
AUTHORS BUGS COPYING DEVELOPERS INSTALL NEWS ONEWS README TODO \
- $PKG/usr/doc/giflib-$VERSION
-cp -a doc $PKG/usr/doc/giflib-$VERSION/html
-rm $PKG/usr/doc/giflib-$VERSION/html/Makefile*
+ $PKG/${PREFIX}/doc/giflib-$VERSION
+cp -a doc $PKG/${PREFIX}/doc/giflib-$VERSION/html
+rm $PKG/${PREFIX}/doc/giflib-$VERSION/html/Makefile*
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+cat ${CWD}/giflib.yypkg.script | sed \
+ -e "s/%{PKG}/giflib/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/giflib-$VERSION-$ARCH-$BUILD.txz
diff --git a/l/giflib/giflib.yypkg.script b/l/giflib/giflib.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/giflib/giflib.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/glib-networking/glib-networking.SlackBuild b/l/glib-networking/glib-networking.SlackBuild
index 7281774..059fa60 100755
--- a/l/glib-networking/glib-networking.SlackBuild
+++ b/l/glib-networking/glib-networking.SlackBuild
@@ -40,20 +40,6 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -67,27 +53,30 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --localstatedir=/${PREFIX}/var \
--enable-static=no \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --mandir=/${PREFIX}/man \
+ --docdir=/${PREFIX}/doc/$PKGNAM-$VERSION \
+ --with-ca-certificates=/${PREFIX}/etc \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
- grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG -print0 | xargs -0 file | egrep "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null || true
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -100,22 +89,27 @@ if [ -d $PKG/usr/man ]; then
)
fi
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* INSTALL NEWS README* \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-zcat $CWD/doinst.sh.gz | sed "s,@LIBDIR@,/usr/lib${LIBDIRSUFFIX}," > $PKG/install/doinst.sh
+# zcat $CWD/doinst.sh.gz | sed "s,@LIBDIR@,/${PREFIX}/lib${LIBDIRSUFFIX}," > $PKG/install/doinst.sh
+
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/l/glib-networking/glib-networking.yypkg.script b/l/glib-networking/glib-networking.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/glib-networking/glib-networking.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/glib2/glib2.SlackBuild b/l/glib2/glib2.SlackBuild
index 12014ef..67a498e 100755
--- a/l/glib2/glib2.SlackBuild
+++ b/l/glib2/glib2.SlackBuild
@@ -40,62 +40,56 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-glib2
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
+set -e
rm -rf $PKG
-mkdir -p $TMP $PKG/usr
+mkdir -p $TMP $PKG/${PREFIX}
cd $TMP
rm -rf glib-$VERSION
tar xvf $CWD/glib-$VERSION.tar.?z* || exit 1
cd glib-$VERSION
chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+chmod -R u+w,go+r-w,a-s .
+
+sed -i \
+ '/AC_DEFINE(._WIN32_WINNT., .0x0501., .Target the Windows XP API.)/ s/501/600/' \
+ configure.ac
# Silly upstream, using the bleeding edge. Reconf:
autoreconf --force --install
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2 -DHAVE_IF_NAMETOINDEX=1" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --mandir=/usr/man \
- --build=$ARCH-slackware-linux
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --mandir=/${PREFIX}/man \
+ --enable-shared \
+ --disable-static \
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG
-# Install profile scripts:
-mkdir -p $PKG/etc/profile.d/
-cp -a $CWD/libglib2.{csh,sh} $PKG/etc/profile.d/
-chown root:root $PKG/etc/profile.d/*
-chmod 755 $PKG/etc/profile.d/*
-mv $PKG/etc/profile.d/libglib2.csh $PKG/etc/profile.d/libglib2.csh.new
-mv $PKG/etc/profile.d/libglib2.sh $PKG/etc/profile.d/libglib2.sh.new
+# # Install profile scripts:
+# PROFILE_D="${PKG}/${PREFIX}/etc/profile.d/"
+# mkdir -p ${PROFILE_D}
+# cp -a $CWD/libglib2.{csh,sh} ${PROFILE_D}
+# chown root:root ${PROFILE_D}/*
+# chmod 755 ${PROFILE_D}/*
+# mv ${PROFILE_D}/libglib2.csh ${PROFILE_D}/libglib2.csh.new
+# mv ${PROFILE_D}/libglib2.sh ${PROFILE_D}/libglib2.sh.new
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -108,24 +102,28 @@ if [ -d $PKG/usr/man ]; then
)
fi
-mkdir -p $PKG/usr/doc/glib-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/glib-$VERSION
cp -a \
AUTHORS COPYING NEWS README \
- $PKG/usr/doc/glib-$VERSION
-( cd $PKG/usr/doc/glib-$VERSION ; ln -s /usr/share/gtk-doc/html/gobject html )
+ $PKG/${PREFIX}/doc/glib-$VERSION
+( cd $PKG/${PREFIX}/doc/glib-$VERSION ; ln -s /${PREFIX}/share/gtk-doc/html/gobject html )
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-zcat $CWD/doinst.sh.gz | sed "s,@LIBDIR@,/usr/lib${LIBDIRSUFFIX}," > $PKG/install/doinst.sh
+# zcat $CWD/doinst.sh.gz | sed "s,@LIBDIR@,/${PREFIX}/lib${LIBDIRSUFFIX}," > $PKG/install/doinst.sh
-cd $PKG
-/sbin/makepkg -l y -c n --prepend $TMP/glib2-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/glib2.yypkg.script | sed \
+ -e "s/%{PKG}/glib2/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/glib2/glib2.yypkg.script b/l/glib2/glib2.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/glib2/glib2.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/gmp/gmp.SlackBuild b/l/gmp/gmp.SlackBuild
index 6280e14..e252d47 100755
--- a/l/gmp/gmp.SlackBuild
+++ b/l/gmp/gmp.SlackBuild
@@ -43,28 +43,11 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=/$TMP/package-gmp
rm -rf $PKG
-mkdir -p $TMP $PKG/usr
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
- LIBDIRSUFFIX=""
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
+mkdir -p $TMP $PKG/${PREFIX}
case "$ARCH" in
- arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
- *) TARGET=$ARCH-slackware-linux ;;
+ arm*) BUILD_TRIPLET=$ARCH-slackware-linux-gnueabi ;;
+ *) BUILD_TRIPLET=$ARCH-slackware-linux ;;
esac
cd $TMP
@@ -78,45 +61,48 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# End of preparations
-if echo "$*" | grep -qw -- --prep ; then
- exit 0
-fi
-
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --infodir=/usr/info \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --infodir=/${PREFIX}/info \
--with-gnu-ld \
--enable-cxx \
- --build=$TARGET
+ --enable-static=no \
+ --enable-shared=yes \
+ --host=${HOST_TRIPLET} \
+ --build=$BUILD_TRIPLET
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-rm $PKG/usr/info/dir
-gzip -9 $PKG/usr/info/*
+rm $PKG/${PREFIX}/info/dir
+gzip -9 $PKG/${PREFIX}/info/*
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-mkdir -p $PKG/usr/doc/gmp-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/gmp-$VERSION
cp -a \
AUTHORS COPYING* NEWS README \
- $PKG/usr/doc/gmp-$VERSION
+ $PKG/${PREFIX}/doc/gmp-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd /$TMP/package-gmp
-/sbin/makepkg -l y -c n $TMP/gmp-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/gmp.yypkg.script | sed \
+ -e "s/%{PKG}/gmp/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/gmp/gmp.yypkg.script b/l/gmp/gmp.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/gmp/gmp.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/gtk+2/doinst.sh.gz b/l/gtk+2/doinst.sh.gz
deleted file mode 100644
index d227808..0000000
--- a/l/gtk+2/doinst.sh.gz
+++ /dev/null
Binary files differ
diff --git a/l/gtk+2/gtk+2.SlackBuild b/l/gtk+2/gtk+2.SlackBuild
index cc8f165..5a6de28 100755
--- a/l/gtk+2/gtk+2.SlackBuild
+++ b/l/gtk+2/gtk+2.SlackBuild
@@ -40,122 +40,80 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-gtk2
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
+set -e
rm -rf $PKG
-mkdir -p $TMP $PKG/usr
+mkdir -p $TMP $PKG/${PREFIX}
cd $TMP
rm -rf gtk+-$VERSION
tar xvf $CWD/gtk+-$VERSION.tar.?z* || exit 1
cd gtk+-$VERSION
chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+chmod -R u+w,go+r-w,a-s .
# Fix build errors
-zcat $CWD/fix_build_issues_on_tutorial_and_faq.diff.gz | patch -p1 --verbose || exit 1
-
-# Do not flood the console or .xsession-errors with "trouble ahead"
-# warnings (most noticable when using Firefox and Flash):
-zcat $CWD/gtk.xid.nowarningflood.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/fix_build_issues_on_tutorial_and_faq.diff.gz | patch -p1 --verbose
# Patch to restore commonly used icon names, otherwise everything breaks.
# I fail to see the point of this "cleanup"
-zcat $CWD/gtk+-2.24.x.icon-compat.diff.gz | patch -p1 --verbose || exit 1
-zcat $CWD/gtk+-2.24.x.icon-compat.am.diff.gz | patch -p1 --verbose || exit 1
-
-# Regenerate ./configure:
-libtoolize --force
-autoreconf -vif
-
-# Autoconf changes linux to linux-gnu.
-# Our host is $ARCH-slackware-linux not $ARCH-slackware-linux-gnu:
-sed -i -e 's#linux|linux-gnu|#linux|linux|#' config.sub
+zcat $CWD/gtk+-2.24.x.icon-compat.diff.gz | patch -p1 --verbose
+zcat $CWD/gtk+-2.24.x.icon-compat.am.diff.gz | patch -p1 --verbose
+
+#! PATCH
+# Thanks fedora:
+# The pre-generated gtk.def file can't be used for MinGW-W64
+# Force a regeneration of this file by removing the bundled copy
+rm -f gtk/gtk.def
+
+#! PATCH
+sed -i \
+ '/gtk_libdir = g_build_filename (root, "lib", NULL);/ s/"lib"/"lib'"${LIBDIRSUFFIX}"'"/' \
+ gtk/gtkmain.c
+
+#! PATCH
+# Behaviour change in 2.24.24 and cross-compiling >= 2.24.24 requires a host
+# with >= 2.24.24 otherwise the added switch (which is there to continue using
+# the previous behaviour wrt image data in the icon cache) makes
+# gtk-update-icon-cache fail (ir probably handles it as a regular argument and
+# not a switch since it doesn't complain about it being unknown).
+# Remove the switch if the host's gtk-update-icon-cache doesn't know about it.
+if ! gtk-update-icon-cache --help | grep -q -- --include-image-data; then
+ sed -i '/--include-image-data/ d' gtk/Makefile.in
+fi
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --mandir=/usr/man \
- --with-xinput=yes \
- --enable-xkb \
- --enable-introspection \
- --build=$ARCH-slackware-linux
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --mandir=/${PREFIX}/man \
+ --host=${HOST_TRIPLET} \
+ --disable-cups \
+ --build=${BUILD_TRIPLET}
make $NUMJOBS || make || exit 1
-# Check the host value that is passed to the compile to the one in this script:
-host="$ARCH-slackware-linux"
-compile_host=$(grep 'host_triplet =' gtk/Makefile | sed -e "s/.* = //")
-if [ "x$compile_host" != "x$host" ]; then
- echo "Host mismatch: compile='$compile_host', SlackBuild='$host'" && exit 1
-fi
-
make install \
RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false \
DESTDIR=$PKG \
|| exit 1
# Don't clobber im-multipress.conf
-mv $PKG/etc/gtk-2.0/im-multipress.conf $PKG/etc/gtk-2.0/im-multipress.conf.new || exit 1
+mv $PKG/${PREFIX}/etc/gtk-2.0/im-multipress.conf $PKG/${PREFIX}/etc/gtk-2.0/im-multipress.conf.new || exit 1
# Install a "starter" gtkrc
-echo 'gtk-theme-name="GTK+"' > $PKG/etc/gtk-2.0/gtkrc.new
-
-# We need to have separate 32-bit and 64-bit binaries
-# for places where we have two copies of the GTK+ package installed.
-# (we might have x86_64 and i486 packages on the same system, for example.)
-case "$host" in
- s390x*|x86_64*)
- mv $PKG/usr/bin/gtk-query-immodules-2.0{,-64}
- ( cd $PKG/usr/bin
- ln -sf gtk-query-immodules-2.0-64 gtk-query-immodules-2.0
- )
- ;;
- *)
- mv $PKG/usr/bin/gtk-query-immodules-2.0{,-32}
- ( cd $PKG/usr/bin
- ln -sf gtk-query-immodules-2.0-32 gtk-query-immodules-2.0
- )
- ;;
-esac
-
-# Install wrappers for the binaries:
-cp -a $CWD/update-gtk-immodules* $PKG/usr/bin
-chown root:root $PKG/usr/bin/update-*
-chmod 0755 $PKG/usr/bin/update-*
-
-# Add profile scripts to set up GTK+ environment:
-mkdir -p $PKG/etc/profile.d
-cp -a $CWD/profile.d/* $PKG/etc/profile.d
-chmod 0755 $PKG/etc/profile.d/*
+echo 'gtk-theme-name="GTK+"' > $PKG/${PREFIX}/etc/gtk-2.0/gtkrc
# Strip binaries:
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | egrep "executable|shared object" | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
)
# Compress and if needed symlink the man pages:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -168,11 +126,11 @@ if [ -d $PKG/usr/man ]; then
)
fi
-mkdir -p $PKG/usr/doc/gtk+-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/gtk+-$VERSION
cp -a \
- AUTHORS COPYING* NEWS README* TODO \
- $PKG/usr/doc/gtk+-$VERSION
-( cd $PKG/usr/doc/gtk+-$VERSION
+ AUTHORS COPYING* NEWS README* \
+ $PKG/${PREFIX}/doc/gtk+-$VERSION
+( cd $PKG/${PREFIX}/doc/gtk+-$VERSION
ln -s ../../share/gtk-doc/html/gail-libgail-util .
ln -s ../../share/gtk-doc/html/gdk .
ln -s ../../share/gtk-doc/html/gtk .
@@ -181,15 +139,17 @@ cp -a \
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/gtk+2-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/gtk+2.yypkg.script | sed \
+ -e "s/%{PKG}/gtk+2/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/gtk+2/gtk+2.yypkg.script b/l/gtk+2/gtk+2.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/gtk+2/gtk+2.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/gtk+2/gtk.xid.nowarningflood.diff.gz b/l/gtk+2/gtk.xid.nowarningflood.diff.gz
deleted file mode 100644
index c4a0f4b..0000000
--- a/l/gtk+2/gtk.xid.nowarningflood.diff.gz
+++ /dev/null
Binary files differ
diff --git a/l/gtk+2/profile.d/gtk+.csh b/l/gtk+2/profile.d/gtk+.csh
deleted file mode 100755
index c9ea5ac..0000000
--- a/l/gtk+2/profile.d/gtk+.csh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/csh
-setenv GDK_USE_XFT 1
diff --git a/l/gtk+2/profile.d/gtk+.sh b/l/gtk+2/profile.d/gtk+.sh
deleted file mode 100755
index ff3d492..0000000
--- a/l/gtk+2/profile.d/gtk+.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-GDK_USE_XFT=1
-export GDK_USE_XFT
diff --git a/l/gtk+2/update-gtk-immodules b/l/gtk+2/update-gtk-immodules
deleted file mode 100644
index a56b3fd..0000000
--- a/l/gtk+2/update-gtk-immodules
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-#
-# This is a wrapper script that calls update-gtk-immodules-2.0 (GTK+2)
-# and/or update-gtk-immodules-3.0 (GTK+3) to do the actual updating.
-
-if [ -x /usr/bin/update-gtk-immodules-2.0 ]; then
- /usr/bin/update-gtk-immodules-2.0 $*
-fi
-if [ -x /usr/bin/update-gtk-immodules-3.0 ]; then
- /usr/bin/update-gtk-immodules-3.0 $*
-fi
-
diff --git a/l/harfbuzz/0001-configure.ac-remove-icu-glib-gobject-cairo-cairo-ft-.patch b/l/harfbuzz/0001-configure.ac-remove-icu-glib-gobject-cairo-cairo-ft-.patch
new file mode 100644
index 0000000..9617de7
--- /dev/null
+++ b/l/harfbuzz/0001-configure.ac-remove-icu-glib-gobject-cairo-cairo-ft-.patch
@@ -0,0 +1,109 @@
+From 5f431b42582150da7c45c437442cd5fafd91b426 Mon Sep 17 00:00:00 2001
+From: Adrien Nader <adrien@notk.org>
+Date: Mon, 6 Oct 2014 08:05:28 +0200
+Subject: [PATCH] configure.ac: remove icu, glib/gobject, cairo/cairo-ft deps.
+
+---
+ configure.ac | 70 ++++++------------------------------------------------------
+ 1 file changed, 6 insertions(+), 64 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 588744e..b8bb9b4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -136,86 +136,28 @@ AM_CONDITIONAL(HAVE_UCDN, $have_ucdn)
+
+ dnl ===========================================================================
+
+-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, have_glib=true, have_glib=false)
+-if $have_glib; then
+- AC_DEFINE(HAVE_GLIB, 1, [Have glib2 library])
+-fi
++have_glib=false
+ AM_CONDITIONAL(HAVE_GLIB, $have_glib)
+
+-PKG_CHECK_MODULES(GOBJECT, gobject-2.0 glib-2.0 >= 2.16, have_gobject=true, have_gobject=false)
+-if $have_gobject; then
+- AC_DEFINE(HAVE_GOBJECT, 1, [Have gobject2 library])
+- GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+- AC_SUBST(GLIB_MKENUMS)
+-fi
++have_gobject=false
+ AM_CONDITIONAL(HAVE_GOBJECT, $have_gobject)
+
+ dnl ==========================================================================
+
+-PKG_CHECK_MODULES(CAIRO, cairo >= 1.8.0, have_cairo=true, have_cairo=false)
+-if $have_cairo; then
+- AC_DEFINE(HAVE_CAIRO, 1, [Have cairo graphics library])
+-fi
++have_cairo=false
+ AM_CONDITIONAL(HAVE_CAIRO, $have_cairo)
+
+-PKG_CHECK_MODULES(CAIRO_FT, cairo-ft, have_cairo_ft=true, have_cairo_ft=false)
+-if $have_cairo_ft; then
+- AC_DEFINE(HAVE_CAIRO_FT, 1, [Have cairo-ft support in cairo graphics library])
+-fi
++have_cairo_ft=false
+ AM_CONDITIONAL(HAVE_CAIRO_FT, $have_cairo_ft)
+
+ dnl ==========================================================================
+
+-PKG_CHECK_MODULES(ICU, icu-uc, have_icu=true, have_icu=false)
+-dnl Fallback to icu-config if ICU pkg-config files could not be found
+-if test "$have_icu" != "true"; then
+- AC_CHECK_TOOL(ICU_CONFIG, icu-config, no)
+- AC_MSG_CHECKING([for ICU by using icu-config fallback])
+- if test "$ICU_CONFIG" != "no" && "$ICU_CONFIG" --version >/dev/null; then
+- have_icu=true
+- # We don't use --cflags as this gives us a lot of things that we don't
+- # necessarily want, like debugging and optimization flags
+- # See man (1) icu-config for more info.
+- ICU_CFLAGS=`$ICU_CONFIG --cppflags`
+- ICU_LIBS=`$ICU_CONFIG --ldflags-libsonly`
+- AC_SUBST(ICU_CFLAGS)
+- AC_SUBST(ICU_LIBS)
+- AC_MSG_RESULT([yes])
+- else
+- AC_MSG_RESULT([no])
+- fi
+-fi
+-
+-if $have_icu; then
+- CXXFLAGS="$CXXFLAGS `$PKG_CONFIG --variable=CXXFLAGS icu-uc`"
+- AC_DEFINE(HAVE_ICU, 1, [Have ICU library])
+-fi
++have_icu=false
+ AM_CONDITIONAL(HAVE_ICU, $have_icu)
+
+ dnl ==========================================================================
+
+-PKG_CHECK_MODULES(ICU_LE, icu-le icu-uc, have_icu_le=true, have_icu_le=false)
+-dnl Fallback to icu-config if ICU pkg-config files could not be found
+-if test "$have_icu_le" != "true"; then
+- AC_CHECK_TOOL(ICU_CONFIG, icu-config, no)
+- AC_MSG_CHECKING([for ICU_LE by using icu-config fallback])
+- if test "$ICU_CONFIG" != "no" && "$ICU_CONFIG" --version >/dev/null; then
+- have_icu_le=true
+- # We don't use --cflags as this gives us a lot of things that we don't
+- # necessarily want, like debugging and optimization flags
+- # See man (1) icu-config for more info.
+- ICU_LE_CFLAGS=`$ICU_CONFIG --cppflags`
+- ICU_LE_LIBS=`$ICU_CONFIG --ldflags-libsonly --ldflags-layout`
+- AC_SUBST(ICU_LE_CFLAGS)
+- AC_SUBST(ICU_LE_LIBS)
+- AC_MSG_RESULT([yes])
+- else
+- AC_MSG_RESULT([no])
+- fi
+-fi
+-if $have_icu_le; then
+- AC_DEFINE(HAVE_ICU_LE, 1, [Have ICU Layout Engine library])
+-fi
++have_icu_le=false
+ AM_CONDITIONAL(HAVE_ICU_LE, $have_icu_le)
+
+ dnl ==========================================================================
+--
+1.8.4
+
diff --git a/l/harfbuzz/config-regular b/l/harfbuzz/config-regular
new file mode 100644
index 0000000..50aa2ab
--- /dev/null
+++ b/l/harfbuzz/config-regular
@@ -0,0 +1 @@
+export NO_ICU_GLIB_DEP="no"
diff --git a/l/harfbuzz/config-yypkg b/l/harfbuzz/config-yypkg
new file mode 100644
index 0000000..52b6bad
--- /dev/null
+++ b/l/harfbuzz/config-yypkg
@@ -0,0 +1 @@
+export NO_ICU_GLIB_DEP="yes"
diff --git a/l/harfbuzz/harfbuzz.SlackBuild b/l/harfbuzz/harfbuzz.SlackBuild
index 287acb8..f699bca 100755
--- a/l/harfbuzz/harfbuzz.SlackBuild
+++ b/l/harfbuzz/harfbuzz.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=harfbuzz
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ arm*) readelf /${PREFIX}/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
@@ -41,19 +41,7 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG
@@ -68,38 +56,49 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+if [ x"${NO_ICU_GLIB_DEP}" = x"yes" ]; then
+ patch -p1 < $CWD/0001-configure.ac-remove-icu-glib-gobject-cairo-cairo-ft-.patch
+ autoreconf -fiv
+fi
+
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --mandir=/${PREFIX}/man \
+ --docdir=/${PREFIX}/doc/$PKGNAM-$VERSION \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING INSTALL NEWS README THANKS TODO \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/$PKGNAM.yypkg.script | sed \
+ -e "s/%{PKG}/$PKGNAM/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/harfbuzz/harfbuzz.yypkg.script b/l/harfbuzz/harfbuzz.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/harfbuzz/harfbuzz.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/icu4c/icu4c.SlackBuild b/l/icu4c/icu4c.SlackBuild
index 1465a28..5c11aef 100755
--- a/l/icu4c/icu4c.SlackBuild
+++ b/l/icu4c/icu4c.SlackBuild
@@ -26,7 +26,7 @@
PKGNAM=icu4c
SRCVER=${SRCVER:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 2- -d . | cut -f 2 -d - | rev)}
VERSION=$(echo $SRCVER | tr _ .)
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -44,62 +44,83 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-icu4c
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf icu
+rm -rf icu icu-native
tar xvf $CWD/icu4c-$SRCVER-src.tar.xz || exit 1
-cd icu || exit 1
-chown -R root:root .
-find . \
+test -d icu || exit 1
+chown -R root:root icu
+find icu \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
+ -exec chmod 755 {} + -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
- -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 400 \) -exec chmod 644 {} +
+
+cp -a icu icu-native
+
+sed -i \
+ -e '/^IMPORT_LIB_EXT = \.lib$/ s/lib/dll.a/' \
+ -e '/^LIBPREFIX=$/ s/$/lib/' \
+ -e '/^LIBICU = \$(STATIC_PREFIX_WHEN_USED)/ s/\$(STATIC_PREFIX_WHEN_USED)/lib/' \
+ icu/source/config/mh-mingw*
+
+(cd icu-native/source/ &&
+ CFLAGS="-O0" CXXFLAGS="-O0" \
+ ./configure \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
+ --enable-shared \
+ --disable-static \
+ --sysconfdir=/${PREFIX}/etc \
+ --localstatedir=/${PREFIX}/var \
+ --build=$ARCH-slackware-linux || exit 1
+ make $NUMJOBS || make || exit 1
+) || exit 1
+
+cd icu
cd source/
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
+ CFLAGS="-O2" \
+ CXXFLAGS="-O2" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
--enable-shared \
--disable-static \
- --sysconfdir=/etc \
- --localstatedir=/var \
+ --sysconfdir=/${PREFIX}/etc \
+ --localstatedir=/${PREFIX}/var \
--disable-samples \
+ --host=${HOST_TRIPLET} \
+ --with-cross-build=${TMP}/icu-native/source \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
cd -
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+(cd ${PKG}/${PREFIX} && mv lib${LIBDIRSUFFIX}/lib*.dll bin)
+
+sed -i '/^Libs:/ s/51//g' ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/*.pc
+
+find $PKG | xargs file | egrep "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null || true
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+find $PKG/${PREFIX}/man -type f -exec gzip -9 {} \;
-mkdir -p $PKG/usr/doc/icu4c-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/icu4c-$VERSION
cp -a \
- license.html readme.html $PKG/usr/doc/icu4c-$VERSION
+ license.html readme.html $PKG/${PREFIX}/doc/icu4c-$VERSION
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/icu4c-$VERSION-$ARCH-$BUILD.txz
diff --git a/l/icu4c/icu4c.yypkg.script b/l/icu4c/icu4c.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/icu4c/icu4c.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/lcms/lcms.SlackBuild b/l/lcms/lcms.SlackBuild
index a7d6f6f..33e9a6a 100755
--- a/l/lcms/lcms.SlackBuild
+++ b/l/lcms/lcms.SlackBuild
@@ -24,32 +24,10 @@
VERSION=${VERSION:-$(echo lcms-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-2}
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
- esac
-fi
+set -e
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-lcms
@@ -68,39 +46,46 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
+patch -p1 --verbose < "${CWD}/lcms1.19-avoid-buffer-overflows-CVE-2013-4276.patch"
+
+CFLAGS="-O2" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
--enable-static=no \
- --build=$ARCH-slackware-linux
+ --build=${BUILD_TRIPLET} \
+ --host=${HOST_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Strip files
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-gzip -9 $PKG/usr/man/man?/*.?
+gzip -9 $PKG/${PREFIX}/man/man?/*.?
-mkdir -p $PKG/usr/doc/lcms-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/lcms-$VERSION
cp -a \
AUTHORS COPYING INSTALL NEWS README* doc \
- $PKG/usr/doc/lcms-$VERSION
-find $PKG/usr/doc/lcms-$VERSION -type f -exec chmod 644 {} \;
+ $PKG/${PREFIX}/doc/lcms-$VERSION
+find $PKG/${PREFIX}/doc/lcms-$VERSION -type f -exec chmod 644 {} \;
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/lcms-$VERSION-$ARCH-$BUILD.txz
-
+cat ${CWD}/lcms.yypkg.script | sed \
+ -e "s/%{PKG}/lcms/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/lcms/lcms.yypkg.script b/l/lcms/lcms.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/lcms/lcms.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/lcms/lcms1.19-avoid-buffer-overflows-CVE-2013-4276.patch b/l/lcms/lcms1.19-avoid-buffer-overflows-CVE-2013-4276.patch
new file mode 100644
index 0000000..8f2f322
--- /dev/null
+++ b/l/lcms/lcms1.19-avoid-buffer-overflows-CVE-2013-4276.patch
@@ -0,0 +1,62 @@
+diff -ur lcms-1.19.dfsg/samples/icctrans.c lcms-1.19.dfsg-patched/samples/icctrans.c
+--- lcms-1.19.dfsg/samples/icctrans.c 2009-10-30 15:57:45.000000000 +0000
++++ lcms-1.19.dfsg-patched/samples/icctrans.c 2013-08-06 11:53:14.385266647 +0100
+@@ -86,6 +86,8 @@
+ static LPcmsNAMEDCOLORLIST InputColorant = NULL;
+ static LPcmsNAMEDCOLORLIST OutputColorant = NULL;
+
++unsigned int Buffer_size = 4096;
++
+
+ // isatty replacement
+
+@@ -500,7 +502,7 @@
+
+ Prefix[0] = 0;
+ if (!lTerse)
+- sprintf(Prefix, "%s=", C);
++ snprintf(Prefix, 20, "%s=", C);
+
+ if (InHexa)
+ {
+@@ -648,7 +650,9 @@
+ static
+ void GetLine(char* Buffer)
+ {
+- scanf("%s", Buffer);
++ char User_buffer[Buffer_size];
++ fgets(User_buffer, (Buffer_size - 1), stdin);
++ sscanf(User_buffer,"%s", Buffer);
+
+ if (toupper(Buffer[0]) == 'Q') { // Quit?
+
+@@ -668,7 +672,7 @@
+ static
+ double GetAnswer(const char* Prompt, double Range)
+ {
+- char Buffer[4096];
++ char Buffer[Buffer_size];
+ double val = 0.0;
+
+ if (Range == 0.0) { // Range 0 means double value
+@@ -738,7 +742,7 @@
+ static
+ WORD GetIndex(void)
+ {
+- char Buffer[4096], Name[40], Prefix[40], Suffix[40];
++ char Buffer[Buffer_size], Name[40], Prefix[40], Suffix[40];
+ int index, max;
+
+ max = cmsNamedColorCount(hTrans)-1;
+diff -ur lcms-1.19.dfsg/tifficc/tiffdiff.c lcms-1.19.dfsg-patched/tifficc/tiffdiff.c
+--- lcms-1.19.dfsg/tifficc/tiffdiff.c 2009-10-30 15:57:46.000000000 +0000
++++ lcms-1.19.dfsg-patched/tifficc/tiffdiff.c 2013-08-06 11:49:06.698951157 +0100
+@@ -633,7 +633,7 @@
+ cmsIT8SetSheetType(hIT8, "TIFFDIFF");
+
+
+- sprintf(Buffer, "Differences between %s and %s", TiffName1, TiffName2);
++ snprintf(Buffer, 256, "Differences between %s and %s", TiffName1, TiffName2);
+
+ cmsIT8SetComment(hIT8, Buffer);
+
diff --git a/l/lcms2/lcms2.SlackBuild b/l/lcms2/lcms2.SlackBuild
index 0ca49b4..2ea2691 100755
--- a/l/lcms2/lcms2.SlackBuild
+++ b/l/lcms2/lcms2.SlackBuild
@@ -41,28 +41,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
- LIBDIRSUFFIX=""
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
-case "$ARCH" in
- arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
- *) TARGET=$ARCH-slackware-linux ;;
-esac
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -81,39 +59,45 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
--enable-static=no \
- --build=$TARGET
+ --build=${BUILD_TRIPLET} \
+ --host=${HOST_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Strip files
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-gzip -9 $PKG/usr/man/man?/*.?
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+gzip -9 $PKG/${PREFIX}/man/man?/*.?
+
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING INSTALL NEWS README* doc \
- $PKG/usr/doc/$PKGNAM-$VERSION
-find $PKG/usr/doc/$PKGNAM-$VERSION -type f -exec chmod 644 {} \;
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
+find $PKG/${PREFIX}/doc/$PKGNAM-$VERSION -type f -exec chmod 644 {} \;
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
+cat ${CWD}/lcms2.yypkg.script | sed \
+ -e "s/%{PKG}/lcms2/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/lcms2/lcms2.yypkg.script b/l/lcms2/lcms2.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/lcms2/lcms2.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libao/libao.SlackBuild b/l/libao/libao.SlackBuild
index 1c7239a..b53a99a 100755
--- a/l/libao/libao.SlackBuild
+++ b/l/libao/libao.SlackBuild
@@ -37,12 +37,6 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "x86_64" ]; then
- LIBDIRSUFFIX="64"
-else
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-libao
@@ -51,7 +45,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf libao-$VERSION
-tar xvf $CWD/libao-$VERSION.tar.gz
+tar xvf $CWD/libao-$VERSION.tar.gz || exit 1
cd libao-$VERSION
chown -R root:root .
find . \
@@ -61,28 +55,40 @@ find . \
-exec chmod 644 {} \;
#zcat $CWD/libao.use_new_alsa_api.diff.gz | patch -p1 --verbose
+
+sed -i '/^libao_la_LDFLAGS =/ s/.*/\0 -lksuser/' src/Makefile.am
+
+autoreconf -fiv
+
+CFLAGS="-O2 -Wall -Wextra" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --host=${HOST_TRIPLET} \
+ --disable-esd \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-mv $PKG/usr/share/man $PKG/usr
-gzip -9 $PKG/usr/man/man?/*.?
+mv $PKG/${PREFIX}/share/man $PKG/${PREFIX}
+gzip -9 $PKG/${PREFIX}/man/man?/*.?
-mv $PKG/usr/share/doc $PKG/usr
+mv $PKG/${PREFIX}/share/doc $PKG/${PREFIX}
cp -a \
AUTHORS COPYING* README* TODO \
- $PKG/usr/doc/libao-$VERSION
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/libao-$VERSION-$ARCH-$BUILD.txz
-
+ $PKG/${PREFIX}/doc/libao-$VERSION
+
+cat ${CWD}/libao.yypkg.script | sed \
+ -e "s/%{PKG}/libao/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libao/libao.yypkg.script b/l/libao/libao.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libao/libao.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libarchive/0001-windows-don-t-undef-stat-since-it-my-be-defined-to-s.patch b/l/libarchive/0001-windows-don-t-undef-stat-since-it-my-be-defined-to-s.patch
new file mode 100644
index 0000000..731b717
--- /dev/null
+++ b/l/libarchive/0001-windows-don-t-undef-stat-since-it-my-be-defined-to-s.patch
@@ -0,0 +1,90 @@
+From 520c62fbfca6173d9481e9e26a21946a0d519284 Mon Sep 17 00:00:00 2001
+From: Adrien Nader <adrien@notk.org>
+Date: Fri, 31 Oct 2014 09:17:26 +0100
+Subject: [PATCH] windows: don't #undef stat since it my be defined to
+ "stat64".
+
+---
+ libarchive/archive_match.c | 2 +-
+ libarchive/archive_platform.h | 2 ++
+ libarchive/archive_read_disk_entry_from_file.c | 2 +-
+ libarchive/archive_util.c | 2 +-
+ libarchive/archive_windows.h | 10 ++++++----
+ 5 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/libarchive/archive_match.c b/libarchive/archive_match.c
+index 6b6be9c..0dcb5e3 100644
+--- a/libarchive/archive_match.c
++++ b/libarchive/archive_match.c
+@@ -1227,7 +1227,7 @@ set_timefilter_pathname_mbs(struct archive_match *a, int timetype,
+ archive_set_error(&(a->archive), EINVAL, "pathname is empty");
+ return (ARCHIVE_FAILED);
+ }
+- if (stat(path, &st) != 0) {
++ if (my_stat(path, &st) != 0) {
+ archive_set_error(&(a->archive), errno, "Failed to stat()");
+ return (ARCHIVE_FAILED);
+ }
+diff --git a/libarchive/archive_platform.h b/libarchive/archive_platform.h
+index ce2f482..e9ec5a4 100644
+--- a/libarchive/archive_platform.h
++++ b/libarchive/archive_platform.h
+@@ -58,6 +58,8 @@
+ * either Windows or Posix APIs. */
+ #if (defined(__WIN32__) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__)
+ #include "archive_windows.h"
++#else
++#define my_stat(fd, st) stat(fd, st)
+ #endif
+
+ /*
+diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c
+index e984aaa..ba78321 100644
+--- a/libarchive/archive_read_disk_entry_from_file.c
++++ b/libarchive/archive_read_disk_entry_from_file.c
+@@ -163,7 +163,7 @@ archive_read_disk_entry_from_file(struct archive *_a,
+ }
+ } else
+ #endif
+- if (stat(path, &s) != 0) {
++ if (my_stat(path, &s) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't stat %s", path);
+ return (ARCHIVE_FAILED);
+diff --git a/libarchive/archive_util.c b/libarchive/archive_util.c
+index 34d8081..43acd51 100644
+--- a/libarchive/archive_util.c
++++ b/libarchive/archive_util.c
+@@ -433,7 +433,7 @@ __archive_mktemp(const char *tmpdir)
+ temp_name.s[temp_name.length-1] = '\0';
+ temp_name.length --;
+ }
+- if (stat(temp_name.s, &st) < 0)
++ if (my_stat(temp_name.s, &st) < 0)
+ goto exit_tmpfile;
+ if (!S_ISDIR(st.st_mode)) {
+ errno = ENOTDIR;
+diff --git a/libarchive/archive_windows.h b/libarchive/archive_windows.h
+index c6f5bc5..a178f49 100644
+--- a/libarchive/archive_windows.h
++++ b/libarchive/archive_windows.h
+@@ -112,10 +112,12 @@
+ #if !defined(__BORLANDC__)
+ #define setmode _setmode
+ #endif
+-#ifdef stat
+-#undef stat
+-#endif
+-#define stat(path,stref) __la_stat(path,stref)
++int __la_stat(const char *pathname, struct stat *buf);
++static inline int
++my_stat(const char *pathname, struct stat *st)
++{
++ return __la_stat(pathname, st);
++}
+ #if !defined(__BORLANDC__)
+ #define strdup _strdup
+ #endif
+--
+1.8.4
+
diff --git a/l/libarchive/config-regular b/l/libarchive/config-regular
new file mode 100644
index 0000000..d498de8
--- /dev/null
+++ b/l/libarchive/config-regular
@@ -0,0 +1 @@
+export CONFIGURE_OPTIONS="--disable-static"
diff --git a/l/libarchive/config-yypkg b/l/libarchive/config-yypkg
new file mode 100644
index 0000000..7a9553e
--- /dev/null
+++ b/l/libarchive/config-yypkg
@@ -0,0 +1,13 @@
+export CONFIGURE_OPTIONS=" \
+ --disable-shared \
+ --disable-bsdtar \
+ --disable-bsdcpio \
+ --without-zlib \
+ --without-bz2lib \
+ --without-lzmadec \
+ --without-lzo2 \
+ --without-iconv \
+ --without-nettle \
+ --without-openssl \
+ --without-xml2 \
+ --without-expat"
diff --git a/l/libarchive/libarchive.SlackBuild b/l/libarchive/libarchive.SlackBuild
index 2133e07..88fbfdf 100755
--- a/l/libarchive/libarchive.SlackBuild
+++ b/l/libarchive/libarchive.SlackBuild
@@ -43,20 +43,6 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -70,35 +56,54 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+#! PATCH
+patch -p1 --verbose < ${CWD}/0001-windows-don-t-undef-stat-since-it-my-be-defined-to-s.patch || exit 1
+patch -p0 --verbose < ${CWD}/use-static-asserts-to-guarantee-abi-compatibility.patch || exit 1
+
+#! PATCH
+STAT_IS_64="-D__MINGW_USE_VC2005_COMPAT"
+
+CFLAGS="-O2 ${STAT_IS_64}" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
+XML2_CONFIG="/${PREFIX}/bin/xml2-config" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --disable-static \
- --build=$ARCH-slackware-linux
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --localstatedir=/${PREFIX}/var \
+ --mandir=/${PREFIX}/man \
+ ${CONFIGURE_OPTIONS} \
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# Strip binaries:
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+#! PATCH
+sed -i '/^Cflags: / s/$/ '"${STAT_IS_64}"'/' \
+ $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/libarchive.pc
+
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-( cd $PKG/usr/man
+( cd $PKG/${PREFIX}/man
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a COPYING* INSTALL NEWS README* $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
+cp -a COPYING* INSTALL NEWS README* $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
+cat ${CWD}/$PKGNAM.yypkg.script | sed \
+ -e "s/%{PKG}/$PKGNAM/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libarchive/libarchive.yypkg.script b/l/libarchive/libarchive.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libarchive/libarchive.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libarchive/use-static-asserts-to-guarantee-abi-compatibility.patch b/l/libarchive/use-static-asserts-to-guarantee-abi-compatibility.patch
new file mode 100644
index 0000000..bb0597f
--- /dev/null
+++ b/l/libarchive/use-static-asserts-to-guarantee-abi-compatibility.patch
@@ -0,0 +1,26 @@
+--- libarchive/archive.h.old 2014-10-27 08:30:30.031884763 +0100
++++ libarchive/archive.h 2014-10-27 08:30:33.721884875 +0100
+@@ -1037,4 +1037,23 @@
+ /* #undef __LA_INT64_T */
+ /* #undef __LA_SSIZE_T */
+
++/* Take advantage of static_assert/_Static_assert to make sure libarchive is
++ * not built and is not used with a "struct stat" that isn't 64bits.
++ * On Windows I had "stat" #define'd to "stat64" but libarchive #undef'ed it in
++ * its private headers; I then built a program that used libarchive and didn't
++ * have that #undef and got ABI issues: libarchive was storing a 32bit offset
++ * in a "struct stat" but the caller was expecting a 64bit one.
++ * This is a best effort check but which should cover most uses. */
++#ifdef __cplusplus
++#if (__cplusplus >= 201103L)
++static_assert(sizeof(struct stat) == sizeof(struct stat64), "Not using largefile support");
++#endif
++#else
++#if ((defined(__STDC_VERSION) && __STDC_VERSION >= 201112L) \
++ || (defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 6)) \
++ || (defined(__clang__) && (__clang_major__ >= 3) && (__clang_minor__ >= 4)))
++_Static_assert(sizeof(struct stat) == sizeof(struct stat64), "Not using largefile support");
++#endif
++#endif
++
+ #endif /* !ARCHIVE_H_INCLUDED */
diff --git a/l/libcddb/libcddb.SlackBuild b/l/libcddb/libcddb.SlackBuild
index 6d5e1a7..1f4f627 100755
--- a/l/libcddb/libcddb.SlackBuild
+++ b/l/libcddb/libcddb.SlackBuild
@@ -43,20 +43,6 @@ PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
mkdir -p $TMP $PKG
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
@@ -70,26 +56,30 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+sed -i '/SEARCH_ALL = ~0,/ s/SEARCH_ALL/LAAAAAPPPPIIIIIINNNNNN/' include/cddb/cddb_conn.h
# Configure:
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
--disable-static \
- --build=$ARCH-slackware-linux
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
# Build and install:
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
# Strip binaries:
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -103,30 +93,32 @@ if [ -d $PKG/usr/man ]; then
fi
# Compress info files, if any:
-if [ -d $PKG/usr/info ]; then
- ( cd $PKG/usr/info
+if [ -d $PKG/${PREFIX}/info ]; then
+ ( cd $PKG/${PREFIX}/info
rm -f dir
gzip -9 *
)
fi
# Add a documentation directory:
-mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION
cp -a \
ABOUT-NLS AUTHORS COPYING* INSTALL NEWS README* THANKS TODO \
- $PKG/usr/doc/${PKGNAM}-$VERSION
+ $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
-
+cat ${CWD}/$PKGNAM.yypkg.script | sed \
+ -e "s/%{PKG}/$PKGNAM/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libcddb/libcddb.yypkg.script b/l/libcddb/libcddb.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libcddb/libcddb.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libcdio/libcdio.SlackBuild b/l/libcdio/libcdio.SlackBuild
index 3ca8e8a..a4e984e 100755
--- a/l/libcdio/libcdio.SlackBuild
+++ b/l/libcdio/libcdio.SlackBuild
@@ -27,32 +27,10 @@ BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -68,27 +46,36 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+sed -i \
+ -e '/# include <ddk\/ntddcdrm.h>/ s;ddk/;;' \
+ -e '/# include <ddk\/ntddscsi.h>/ s;ddk/;;' \
+ lib/driver/MSWindows/win32_ioctl.c
+
# Configure:
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --infodir=/usr/info \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
+ --infodir=/${PREFIX}/info \
--disable-static \
- --build=$ARCH-slackware-linux
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
# Build and install:
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
# Strip binaries:
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -102,30 +89,32 @@ if [ -d $PKG/usr/man ]; then
fi
# Compress info files, if any:
-if [ -d $PKG/usr/info ]; then
- ( cd $PKG/usr/info
+if [ -d $PKG/${PREFIX}/info ]; then
+ ( cd $PKG/${PREFIX}/info
rm -f dir
gzip -9 *
)
fi
# Add a documentation directory:
-mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION
cp -a \
AUTHORS COPYING INSTALL MSVC NEWS README README.libcdio THANKS TODO \
- $PKG/usr/doc/${PKGNAM}-$VERSION
+ $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
-
+cat ${CWD}/$PKGNAM.yypkg.script | sed \
+ -e "s/%{PKG}/$PKGNAM/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libcdio/libcdio.yypkg.script b/l/libcdio/libcdio.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libcdio/libcdio.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libdvdread/libdvdread.SlackBuild b/l/libdvdread/libdvdread.SlackBuild
index 84ddae0..0b1ea9f 100755
--- a/l/libdvdread/libdvdread.SlackBuild
+++ b/l/libdvdread/libdvdread.SlackBuild
@@ -22,39 +22,17 @@
PKGNAM=libdvdread
-VERSION=4.2.0
+VERSION=${VERSION:-4.2.0}
BUILD=${BUILD:-1}
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
- esac
-fi
-
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -68,37 +46,57 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-[ ! -x configure ] && ./autogen.sh
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+#! PATCH
+# The 5.0.0 tarball is weird: it has an 'msvc' directory inside an otherwise
+# empty 'msvc' directory. This doesn't match the git repository and makes the
+# build fail.
+mv msvc/msvc msvc.new
+rm -r msvc
+mv msvc.new msvc
+
+#! PATCH
+# Add missing -no-undefined when making shared library.
+sed -i '/libdvdread_la_LDFLAGS = -version-info $(DVDREAD_LTVERSION) \\$/ a -no-undefined \\' Makefile.in
+
+# --enable-dlfcn is needed for configure to not discover anything that matches
+# -ldl on the system (i.e. evil or dlfcn-win32).
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --localstatedir=/${PREFIX}/var \
--disable-static \
- --build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux
+ --enable-dlfcn \
+ --build=${BUILD_TRIPLET} \
+ --host=${HOST_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
- AUTHORS COPYING* DEVELOPMENT-POLICY.txt INSTALL NEWS README* TODO \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ AUTHORS COPYING* NEWS README* TODO \
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+find $PKG | xargs file | egrep "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
+cat ${CWD}/$PKGNAM.yypkg.script | sed \
+ -e "s/%{PKG}/$PKGNAM/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libdvdread/libdvdread.yypkg.script b/l/libdvdread/libdvdread.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libdvdread/libdvdread.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libffi/libffi.SlackBuild b/l/libffi/libffi.SlackBuild
index 1eb06bf..ced2713 100755
--- a/l/libffi/libffi.SlackBuild
+++ b/l/libffi/libffi.SlackBuild
@@ -31,7 +31,7 @@ BUILD=${BUILD:-2}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ arm*) readelf /${PREFIX}/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
@@ -42,20 +42,6 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -72,31 +58,37 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --localstatedir=/${PREFIX}/var \
+ --mandir=/${PREFIX}/man \
+ --infodir=/${PREFIX}/info \
+ --docdir=/${PREFIX}/doc/$PKGNAM-$VERSION \
--disable-static \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux || exit 1
-make || exit 1
+find -name 'Makefile' \
+ -exec sed -i 's;\(toolexeclibdir = $(libdir)\)/../lib;\1;' {} +
+
+make -j7 || exit 1
make install DESTDIR=$PKG || exit 1
# Strip binaries:
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | egrep "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} \
+ | cut -f 1 -d : | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
)
# Compress and if needed symlink the man pages:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -110,26 +102,30 @@ if [ -d $PKG/usr/man ]; then
fi
# Compress info files, if any:
-if [ -d $PKG/usr/info ]; then
- ( cd $PKG/usr/info
+if [ -d $PKG/${PREFIX}/info ]; then
+ ( cd $PKG/${PREFIX}/info
rm -f dir
gzip -9 *
)
fi
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a LICENSE README $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
+cp -a LICENSE README $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/l/libffi/libffi.yypkg.script b/l/libffi/libffi.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libffi/libffi.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libid3tag/libid3tag.SlackBuild b/l/libid3tag/libid3tag.SlackBuild
index 30292f9..f069339 100755
--- a/l/libid3tag/libid3tag.SlackBuild
+++ b/l/libid3tag/libid3tag.SlackBuild
@@ -37,20 +37,6 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
@@ -70,18 +56,22 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# PATCH
+sed -i '/libid3tag_la_LDFLAGS/ s/$/ -no-undefined/' Makefile.am
+autoreconf -fiv
+
# Configure:
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --mandir=/${PREFIX}/man \
--disable-static \
--disable-debugging \
- --program-prefix= \
- --program-suffix= \
- --build=$ARCH-slackware-linux
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
# Build and install:
make $NUMJOBS || make || exit 1
@@ -90,16 +80,17 @@ make install DESTDIR=$PKG || exit 1
# Someone, somewhere, decided that id3tag.pc was "missing", and
# now software is starting to think it's a standard feature.
# Bah!
-mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
-cat $CWD/id3tag.pc | sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/id3tag.pc
+mkdir -p $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig
+cat $CWD/id3tag.pc | sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" > $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/id3tag.pc
-# Strip binaries:
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Strip files
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -113,22 +104,27 @@ if [ -d $PKG/usr/man ]; then
fi
# Compress info files, if any:
-if [ -d $PKG/usr/info ]; then
- ( cd $PKG/usr/info
+if [ -d $PKG/${PREFIX}/info ]; then
+ ( cd $PKG/${PREFIX}/info
rm -f dir
gzip -9 *
)
fi
# Add a documentation directory:
-mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION
cp -a \
CHANGES COPYING COPYRIGHT CREDITS README TODO VERSION \
- $PKG/usr/doc/${PKGNAM}-$VERSION
+ $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
-
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libid3tag/libid3tag.yypkg.script b/l/libid3tag/libid3tag.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libid3tag/libid3tag.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libidn/libidn.SlackBuild b/l/libidn/libidn.SlackBuild
index 905b3e4..857fa5d 100755
--- a/l/libidn/libidn.SlackBuild
+++ b/l/libidn/libidn.SlackBuild
@@ -25,32 +25,8 @@ PKGNAM=libidn
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-2}
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
- esac
-fi
-
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-libidn
@@ -64,27 +40,32 @@ cd libidn-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
+ -exec chmod 755 {} + -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ -exec chmod 644 {} +
-CFLAGS="$SLKCFLAGS" \
+# C# support can be enabled through pnet or mono
+CFLAGS="-O2" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --build=$ARCH-slackware-linux
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
+ --infodir=/${PREFIX}/info \
+ --disable-csharp \
+ --enable-gcc-warnings \
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and if needed symlink the man pages:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -98,31 +79,34 @@ if [ -d $PKG/usr/man ]; then
fi
# Compress info pages and purge "dir" file from the package:
-if [ -d $PKG/usr/info ]; then
- ( cd $PKG/usr/info
+if [ -d $PKG/${PREFIX}/info ]; then
+ ( cd $PKG/${PREFIX}/info
rm -f dir
gzip -9 *
)
fi
-mkdir -p $PKG/usr/doc/libidn-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/libidn-$VERSION
cp -a \
ABOUT-NLS AUTHORS COPYING* FAQ INSTALL NEWS README* THANKS TODO \
contrib \
libidn/libidn.html \
- $PKG/usr/doc/libidn-$VERSION
+ $PKG/${PREFIX}/doc/libidn-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/libidn-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/$PKGNAM.yypkg.script | sed \
+ -e "s/%{PKG}/$PKGNAM/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libidn/libidn.yypkg.script b/l/libidn/libidn.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libidn/libidn.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libjpeg/config-regular b/l/libjpeg/config-regular
new file mode 100644
index 0000000..6844c64
--- /dev/null
+++ b/l/libjpeg/config-regular
@@ -0,0 +1 @@
+export DISABLE_STATIC="--disable-static"
diff --git a/l/libjpeg/config-yypkg b/l/libjpeg/config-yypkg
new file mode 100644
index 0000000..82c599b
--- /dev/null
+++ b/l/libjpeg/config-yypkg
@@ -0,0 +1,2 @@
+
+export DISABLE_STATIC="--enable-static --disable-shared"
diff --git a/l/libjpeg/jpeg.CVE-2013-6629.diff.gz b/l/libjpeg/jpeg.CVE-2013-6629.diff.gz
deleted file mode 100644
index 595588b..0000000
--- a/l/libjpeg/jpeg.CVE-2013-6629.diff.gz
+++ /dev/null
Binary files differ
diff --git a/l/libjpeg/libjpeg.SlackBuild b/l/libjpeg/libjpeg.SlackBuild
index 9083841..2a7c1b3 100755
--- a/l/libjpeg/libjpeg.SlackBuild
+++ b/l/libjpeg/libjpeg.SlackBuild
@@ -21,7 +21,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=${VERSION:-v8a}
+VERSION=${VERSION:-v9a}
BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
@@ -40,20 +40,6 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-libjpeg
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
@@ -69,25 +55,26 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-zcat $CWD/jpeg.CVE-2013-6629.diff.gz | patch -p1 --verbose || exit 1
-
-export CFLAGS="$SLKCFLAGS"
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --mandir=/usr/man \
- --libdir=/usr/lib${LIBDIRSUFFIX}
+ --prefix=/${PREFIX} \
+ --mandir=/${PREFIX}/man \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ ${DISABLE_STATIC} \
+ --host=${HOST_TRIPLET}
+
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG
# Strip binaries:
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | egrep "executable|shared object" | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
)
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -100,13 +87,15 @@ if [ -d $PKG/usr/man ]; then
)
fi
-mkdir -p $PKG/usr/doc/libjpeg-$VERSION
-cp -a README $PKG/usr/doc/libjpeg-$VERSION
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-# Build the package:
-cd $PKG
-makepkg -c y -l y $TMP/libjpeg-$VERSION-$ARCH-$BUILD.txz
+mkdir -p $PKG/${PREFIX}/doc/libjpeg-$VERSION
+cp -a README $PKG/${PREFIX}/doc/libjpeg-$VERSION
+
+cat ${CWD}/libjpeg.yypkg.script | sed \
+ -e "s/%{PKG}/libjpeg/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libjpeg/libjpeg.yypkg.script b/l/libjpeg/libjpeg.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libjpeg/libjpeg.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libmad/Makefile.am b/l/libmad/Makefile.am
new file mode 100644
index 0000000..9e78c4e
--- /dev/null
+++ b/l/libmad/Makefile.am
@@ -0,0 +1,100 @@
+
+MAINTAINERCLEANFILES = Makefile.in
+
+BUILT_SOURCES = mad.h
+include_HEADERS = mad.h
+
+mad.h: config.status config.h Makefile \
+ $(srcdir)/COPYRIGHT $(srcdir)/mad.h.sed $(exported_headers)
+ (sed -e '1s|.*|/*|' -e '1b' -e '$$s|.*| */|' -e '$$b' \
+ -e 's/^.*/ *&/' $(srcdir)/COPYRIGHT; echo; \
+ echo "# ifdef __cplusplus"; \
+ echo 'extern "C" {'; \
+ echo "# endif"; echo; \
+ if [ ".$(FPM)" != "." ]; then \
+ echo ".$(FPM)" | sed -e 's|^\.-D|# define |'; echo; \
+ fi; \
+ sed -ne 's/^# *define *\(HAVE_.*_ASM\).*/# define \1/p' \
+ config.h; echo; \
+ sed -ne 's/^# *define *OPT_\(SPEED\|ACCURACY\).*/# define OPT_\1/p' \
+ config.h; echo; \
+ sed -ne 's/^# *define *\(SIZEOF_.*\)/# define \1/p' \
+ config.h; echo; \
+ for header in $(exported_headers); do \
+ echo; \
+ sed -n -f $(srcdir)/mad.h.sed $(srcdir)/$$header; \
+ done; echo; \
+ echo "# ifdef __cplusplus"; \
+ echo '}'; \
+ echo "# endif") >$@
+
+lib_LTLIBRARIES = libmad.la
+
+exported_headers = \
+version.h \
+fixed.h \
+bit.h \
+timer.h \
+stream.h \
+frame.h \
+synth.h \
+decoder.h
+
+libmad_la_SOURCES = \
+version.c \
+fixed.c \
+bit.c \
+timer.c \
+stream.c \
+frame.c \
+synth.c \
+decoder.c \
+layer12.c \
+layer3.c \
+huffman.c \
+$(exported_headers) \
+global.h \
+layer12.h \
+layer3.h \
+huffman.h \
+D.dat \
+imdct_s.dat \
+qc_table.dat \
+rq_table.dat \
+sf_table.dat
+#synth_mmx.S
+#imdct_l_arm.S
+
+.c.s:
+ $(COMPILE) -S $<
+
+libmad_la_CPPFLAGS = \
+@FPM@ \
+@ASO@
+
+libmad_la_LIBADD = @ASO_OBJS@
+
+version_current = 2
+version_revision = 1
+version_age = 2
+version_info = $(version_current):$(version_revision):$(version_age)
+
+libmad_la_LDFLAGS = -no-undefined -version-info $(version_info)
+
+bin_PROGRAMS = minimad
+
+minimad_SOURCES = minimad.c
+minimad_LDADD = libmad.la
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = mad.pc
+
+EXTRA_DIST = \
+mad.pc.in \
+mad.sed \
+msvc++/config.h \
+msvc++/libmad.dsp \
+msvc++/mad.h
+
+clean-local:
+ $(RM) mad.h
diff --git a/l/libmad/configure.ac b/l/libmad/configure.ac
new file mode 100644
index 0000000..3da0cf0
--- /dev/null
+++ b/l/libmad/configure.ac
@@ -0,0 +1,286 @@
+dnl -*- m4 -*-
+dnl
+dnl libmad - MPEG audio decoder library
+dnl Copyright (C) 2000-2004 Underbit Technologies, Inc.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+
+AC_PREREQ([2.59])
+
+AC_INIT([MPEG Audio Decoder], [0.15.1b], [support@underbit.com], [libmad])
+
+AC_CONFIG_SRCDIR([decoder.h])
+AC_CONFIG_HEADER([config.h])
+
+AM_INIT_AUTOMAKE([1.6 dist-bzip2])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+LT_INIT([win32-dll disable-static])
+
+AC_CANONICAL_HOST
+
+### Additional options to configure
+
+AC_ARG_ENABLE([speed],
+ [AS_HELP_STRING([--enable-speed],
+ [optimize for speed over accuracy @<:@default=disabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ optimize_for="yes"
+ else
+ optimize_for="no"
+ fi
+ ],
+ [optimize_for="no"])
+
+AC_MSG_CHECKING([whether to optimize for speed or for accuracy])
+if test "x${optimize_for}" = "xyes" ; then
+ AC_MSG_RESULT([speed])
+ AC_DEFINE([OPT_SPEED], [1], [Define to optimize for speed over accuracy.])
+else
+ AC_MSG_RESULT([accuracy])
+ AC_DEFINE([OPT_ACCURACY], [1], [Define to optimize for accuracy over speed.])
+fi
+
+AC_ARG_ENABLE([fpm],
+ [AS_HELP_STRING([--enable-fpm=ARCH],
+ [use ARCH-specific fixed-point math routines
+ (one of: intel, arm, mips, sparc, ppc, 64bit, float, no, yes (=auto) @<:@default=auto@:>@)])],
+ [fpm=$enableval],
+ [fpm=yes])
+
+case "${fpm}" in
+ yes) FPMV="" ;;
+ no) FPMV="DEFAULT" ;;
+ intel) FPMV="INTEL" ;;
+ arm) FPMV="ARM" ;;
+ mips) FPMV="MIPS" ;;
+ sparc) FPMV="SPARC" ;;
+ ppc) FPMV="PPC" ;;
+ 64bit) FPMV="64BIT" ;;
+ float) FPMV="FLOAT" ;;
+ *) AC_MSG_ERROR([bad option for fixed_point math routines])
+esac
+
+if test -z "$FPMV" && test "$GCC" = "yes" ; then
+ case "$host" in
+ i?86-*) FPMV="INTEL" ;;
+ arm*-*) FPMV="ARM" ;;
+ mips*-*) FPMV="MIPS" ;;
+ sparc*-*) FPMV="SPARC" ;;
+ powerpc*-*) FPMV="PPC" ;;
+ *) FPMV="DEFAULT" ;;
+ esac
+fi
+
+AC_MSG_CHECKING([for architecture-specific fixed-point math routines])
+AC_MSG_RESULT([$FPMV])
+
+if test "x$FPMV" = "xDEFAULT" ; then
+ AC_MSG_WARN([default fixed-point math will yield limited accuracy])
+fi
+
+FPM="-DFPM_$FPMV"
+AC_SUBST([FPM])
+
+AC_ARG_ENABLE([sso],
+ [AS_HELP_STRING([--enable-sso],
+ [enable subband synthesis optimization @<:@default=disabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ sso="yes"
+ else
+ sso="no"
+ fi
+ ],
+ [sso="no"])
+
+AC_MSG_CHECKING([whether to enable subband synthesis optimization])
+AC_MSG_RESULT([$sso])
+
+if test "x${sso}" = "xyes" ; then
+ AC_DEFINE([OPT_SSO], [1], [Define to enable fast subband synthesis approximation optimization.])
+fi
+
+AC_ARG_ENABLE([aso],
+ [AS_HELP_STRING([--disable-aso],
+ [disable architecture-specific optimization @<:@default=disabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ aso="yes"
+ else
+ aso="no"
+ fi
+ ],
+ [aso="no"])
+
+AC_MSG_CHECKING([whether to enable subband synthesis optimization])
+AC_MSG_RESULT([$aso])
+
+if test "x${aso}" = "xyes" ; then
+ case "$host" in
+ i?86-*)
+ : #ASO="$ASO -DASO_INTERLEAVE1"
+ ASO="$ASO -DASO_ZEROCHECK"
+ : #not yet #ASO="$ASO -DASO_SYNTH"
+ : #not yet #ASO_OBJS="synth_mmx.lo"
+ ;;
+ arm*-*)
+ ASO="$ASO -DASO_INTERLEAVE1"
+ ASO="$ASO -DASO_IMDCT"
+ ASO_OBJS="imdct_l_arm.lo"
+ ;;
+ mips*-*)
+ ASO="$ASO -DASO_INTERLEAVE2"
+ ASO="$ASO -DASO_ZEROCHECK"
+ ;;
+ esac
+fi
+
+AC_SUBST([ASO])
+AC_SUBST([ASO_OBJS])
+
+AC_ARG_ENABLE([strict-iso],
+ [AS_HELP_STRING([--enable-strict-iso],
+ [enable strict ISO/IEC interpretations @<:@default=disabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ strict_iso="yes"
+ else
+ strict_iso="no"
+ fi
+ ],
+ [strict_iso="no"])
+
+AC_MSG_CHECKING([whether to enable ISO/IEC interpretation])
+AC_MSG_RESULT([$strict_iso])
+
+if test "x${strict_iso}" = "xyes" ; then
+ AC_DEFINE([OPT_STRICT], [1], [Define to enable strict interpretation of the ISO/IEC standards.])
+fi
+
+AC_ARG_ENABLE([profiling],
+ [AS_HELP_STRING([--enable-profiling],
+ [enable profiling @<:@default=disabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ profiling="yes"
+ else
+ profiling="no"
+ fi
+ ],
+ [profiling="no"])
+
+AC_MSG_CHECKING([whether to enable profiling])
+AC_MSG_RESULT([$profiling])
+
+if test "x${profiling}" = "xyes" ; then
+ AC_DEFINE([DEBUG], [1], [Define to enable diagnostic debugging support.])
+else
+ AC_DEFINE([NDEBUG], [1], [Define to disable diagnostic debugging support.])
+fi
+
+AM_CONDITIONAL([HAVE_PROFILING], [test "x${profiling}" = "xyes"])
+
+AC_ARG_ENABLE([experimental],
+ [AS_HELP_STRING([--enable-experimental],
+ [enable experimental code @<:@default=disabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ experimental="yes"
+ else
+ experimental="no"
+ fi
+ ],
+ [experimental="no"])
+
+AC_MSG_CHECKING([whether to enable experimental code])
+AC_MSG_RESULT([$experimental])
+
+if test "x${experimental}" = "xyes" ; then
+ AC_DEFINE([EXPERIMENTAL], [1], [Define to enable experimental code.])
+fi
+
+### Checks for programs
+AC_PROG_CC
+AM_PROG_AS
+
+### Checks for libraries
+
+### Checks for header files
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS([assert.h limits.h unistd.h sys/types.h fcntl.h errno.h])
+
+### Checks for types
+AC_TYPE_PID_T
+
+AC_CHECK_SIZEOF(int, 2)
+AC_CHECK_SIZEOF(long, 4)
+AC_CHECK_SIZEOF(long long, 8)
+
+### Checks for structures
+
+### Checks for compiler characteristics
+AC_C_INLINE
+AC_C_BIGENDIAN
+
+### Checks for linker characteristics
+
+### Checks for library functions
+AC_CHECK_FUNCS([waitpid fcntl pipe fork])
+
+AC_CONFIG_FILES([
+Makefile
+msvc++/Makefile
+libmad.list
+mad.pc
+])
+
+AC_OUTPUT
+
+echo
+echo
+echo
+echo "------------------------------------------------------------------------"
+echo "$PACKAGE_NAME $PACKAGE_VERSION"
+echo "------------------------------------------------------------------------"
+echo
+echo "Configuration Options Summary:"
+echo
+echo " OS...................: ${host_os}"
+echo " Windows version......: ${_efl_windows_version}"
+echo
+if test "x${optimize_for}" = "xyes" ; then
+echo " optimization.........: speed"
+else
+echo " Optimization.........: accuracy"
+fi
+echo " Fixed-point math.....: ${FPMV}"
+echo " Subband synthesis....: ${sso}"
+echo " Strict ISO/IEC.......: ${strict_iso}"
+echo " Profiling............: ${profiling}"
+echo " Experimental code....: ${experimental}"
+echo
+echo "Compilation............: make (or gmake)"
+echo " CPPFLAGS.............: $CPPFLAGS"
+echo " CFLAGS...............: $CFLAGS"
+echo " CCAS.................: $CCAS"
+echo " CCASFLAGS............: $CCASFLAGS"
+echo " LDFLAGS..............: $LDFLAGS"
+echo
+echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
+echo " prefix...............: $prefix"
+echo
diff --git a/l/libmad/libmad.SlackBuild b/l/libmad/libmad.SlackBuild
index 0a78183..ae6d2c0 100755
--- a/l/libmad/libmad.SlackBuild
+++ b/l/libmad/libmad.SlackBuild
@@ -37,19 +37,14 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
+case "${HOST_TRIPLET}" in
+ i686-w64-mingw32)
+ ENABLE_FPM="intel"
+ ;;
+ x86_64-w64-mingw32)
+ ENABLE_FPM="64bit"
+ ;;
+esac
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -70,17 +65,26 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+cp ${CWD}/configure.ac ${CWD}/Makefile.am ${CWD}/mad.pc.in .
+
+sed -i '/bin_PROGRAMS = minimad/ s/minimad//' Makefile.am
+
+autoreconf -fiv
+
# Configure:
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
- --mandir=/usr/man \
+ --mandir=/${PREFIX}/man \
--disable-static \
--disable-debugging \
--program-prefix= \
--program-suffix= \
+ --host=${HOST_TRIPLET} \
+ --enable-fpm=${ENABLE_FPM} \
--build=$ARCH-slackware-linux
# Build and install:
@@ -88,17 +92,17 @@ make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
# This is what happens when every distro makes up its own standards
-mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
-sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" $CWD/mad.pc \
- > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/mad.pc
+# mkdir -p $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig
+# sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" $CWD/mad.pc \
+# > $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/mad.pc
-# Strip binaries:
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -112,22 +116,24 @@ if [ -d $PKG/usr/man ]; then
fi
# Compress info files, if any:
-if [ -d $PKG/usr/info ]; then
- ( cd $PKG/usr/info
+if [ -d $PKG/${PREFIX}/info ]; then
+ ( cd $PKG/${PREFIX}/info
rm -f dir
gzip -9 *
)
fi
# Add a documentation directory:
-mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION
cp -a \
CHANGES COPYING* COPYRIGHT CREDITS README* TODO VERSION \
- $PKG/usr/doc/${PKGNAM}-$VERSION
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
-
+ $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION
+
+cat ${CWD}/libmad.yypkg.script | sed \
+ -e "s/%{PKG}/libmad/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libmad/libmad.yypkg.script b/l/libmad/libmad.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libmad/libmad.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libmad/mad.pc.in b/l/libmad/mad.pc.in
new file mode 100644
index 0000000..f1b0048
--- /dev/null
+++ b/l/libmad/mad.pc.in
@@ -0,0 +1,12 @@
+PACKAGE_TARNAME=@PACKAGE_TARNAME@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: MAD
+Description: libmad library
+Version: @VERSION@
+Libs: -L${libdir} -lmad
+Libs.private:
+Cflags: -I${includedir}
diff --git a/l/libmpc/libmpc.SlackBuild b/l/libmpc/libmpc.SlackBuild
index c667412..819260f 100755
--- a/l/libmpc/libmpc.SlackBuild
+++ b/l/libmpc/libmpc.SlackBuild
@@ -42,20 +42,6 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$SRCNAM
@@ -68,44 +54,58 @@ tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* || exit 1
cd $SRCNAM-$VERSION
chown -R root:root .
-CFLAGS="$SLKCFLAGS" \
+#! PATCH: Fix passing of -no-undefined to libtool
+# 1- remove it from LDFLAGS since it's for libtool, not ld:
+sed -i -e '/LDFLAGS="\$LDFLAGS -no-undefined"/ d' acinclude.m4
+# 2- add it to libmpc_la_LDFLAGS which is what is passed to libtool:
+sed -i -e 's/libmpc_la_LDFLAGS = -version-info 2:0:0/\0 -no-undefined/' src/Makefile.am
+# 3- add AM_PROG_AR in configure.ac otherwise automake warns and warn-errors
+# that it is missing:
+sed -i -e 's/AC_LANG(C)/AM_PROG_AR\n\0/' configure.ac
+
+autoreconf -fiv
+
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --infodir=/usr/info \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --enable-static=yes \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --infodir=/${PREFIX}/info \
+ --docdir=/${PREFIX}/doc/$PKGNAM-$VERSION \
+ --enable-static=no \
--enable-shared=yes \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-
-# Hardly a savings doing this...
-#strip -g $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-rm -f $PKG/usr/info/dir
-gzip -9 $PKG/usr/info/*
+rm -f $PKG/${PREFIX}/info/dir
+gzip -9 $PKG/${PREFIX}/info/*
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* INSTALL NEWS README* TODO \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-${VERSION}-${ARCH}-${BUILD}.txz
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libmpc/libmpc.yypkg.script b/l/libmpc/libmpc.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libmpc/libmpc.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libogg/libogg.SlackBuild b/l/libogg/libogg.SlackBuild
index 01e7b49..1039ec0 100755
--- a/l/libogg/libogg.SlackBuild
+++ b/l/libogg/libogg.SlackBuild
@@ -25,30 +25,9 @@ VERSION=${VERSION:-$(echo libogg-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
- esac
-fi
-
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
+set -e
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -62,33 +41,34 @@ rm -rf libogg-$VERSION
tar xvf $CWD/libogg-$VERSION.tar.?z* || exit 1
cd libogg-$VERSION
chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+chmod -R u+w,go+r-w,a-s .
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --build=$ARCH-slackware-linux
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --docdir=/${PREFIX}/doc/libogg-${VERSION} \
+ --disable-static \
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-
-mv $PKG/usr/share/doc $PKG/usr
-cp -a \
- AUTHORS CHANGES COPYING README \
- $PKG/usr/doc/libogg-$VERSION
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+cp -a AUTHORS CHANGES COPYING README $PKG/${PREFIX}/doc/libogg-$VERSION
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/libogg-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/libogg.yypkg.script | sed \
+ -e "s/%{PKG}/libogg/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libogg/libogg.yypkg.script b/l/libogg/libogg.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libogg/libogg.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libpng/libpng.SlackBuild b/l/libpng/libpng.SlackBuild
index d338e5c..38aacfe 100755
--- a/l/libpng/libpng.SlackBuild
+++ b/l/libpng/libpng.SlackBuild
@@ -21,8 +21,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION_OLD=1.2.50
-VERSION_NEW=1.4.12
+VERSION=${VERSION:-1.4.14}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
@@ -35,19 +34,13 @@ if [ -z "$ARCH" ]; then
esac
fi
-if [ "$ARCH" = "x86_64" ]; then
- LIBDIRSUFFIX="64"
-else
- LIBDIRSUFFIX=""
-fi
+set -e
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-libpng
rm -rf $PKG
-mkdir -p $TMP $PKG/usr
-
-build_source() {
+mkdir -p $TMP $PKG/${PREFIX}
cd $TMP
rm -rf libpng-$VERSION
@@ -61,74 +54,53 @@ find . \
-exec chmod 644 {} \;
# Look like using ./configure is the only way that works now...
-./configure --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man
+HAVE_SOLARIS_LD_TRUE='#' HAVE_SOLARIS_LD_FALSE='' \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
+./configure \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --host=${HOST_TRIPLET} \
+ --disable-static \
+ --mandir=/${PREFIX}/man
-make -j4 prefix=/usr LIBPATH=/usr/lib${LIBDIRSUFFIX} ZLIBLIB="-L/usr/lib${LIBDIRSUFFIX} -lm -lz" || exit 1
-make install prefix=/usr LIBPATH=/usr/lib${LIBDIRSUFFIX} ZLIBLIB="-L/usr/lib${LIBDIRSUFFIX} -lm -lz" DESTDIR=$PKG
+# It was working by default so the libpng people had to break installation of
+# libraries and clutter everything with their awful redundant names.
+sed -i '/\t$(MAKE) $(AM_MAKEFLAGS) install-\(data\|exec\)-hook/ d' Makefile
-# I'm ditching this to see if anyone cares.
-#
-## This symlink is needed to keep old applications running:
-## I guess the real lib used the major number 3, then 0 for
-## a short while, and now .3 again. Hopefully it will stay
-## this way as it was .3 in Slackware 10.2. One can hope.
-#( cd $PKG/usr/lib${LIBDIRSUFFIX}
-# if [ ! -e libpng.so.0 -a -e libpng.so.3 ]; then
-# ln -sf libpng.so.3 libpng.so.0
-# fi
-#)
-
-# Well, glad I got rid of the above, but <someone> upstream still does not
-# grok shared libraries on Linux it seems -- libpng-1.4.0 caused all the
-# newly compiled binaries to want libpng.so.14, and now libpng-1.4.1
-# wants to change that to libpng14.so.14. Searching online finds that
-# we are not the only ones with binaries that want libpng.so.14, so we
-# are forced to provide a compatibility symlink again... :-/
-#
-# We'll try to remove this in 5 to 10 years, just like before.
-( cd $PKG/usr/lib${LIBDIRSUFFIX}
- if [ ! -e libpng.so.14 -a -e libpng14.so.14 ]; then
- ln -sf libpng14.so.14 libpng.so.14
- fi
-)
+make -j4 || exit 1
+make install DESTDIR=$PKG
+
+rm -f $PKG/$PREFIX/lib${LIBDIRSUFFIX}/libpng{14,}.a
+ln -s libpng14.dll.a $PKG/$PREFIX/lib${LIBDIRSUFFIX}/libpng.dll.a
+ln -s libpng14-14.dll $PKG/$PREFIX/bin/libpng.dll
+
+ln -s libpng14.pc $PKG/$PREFIX/lib${LIBDIRSUFFIX}/pkgconfig/libpng.pc
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-gzip -9 --force $PKG/usr/man/man?/*.?
+gzip -9 --force $PKG/${PREFIX}/man/man?/*.?
-mkdir -p $PKG/usr/doc/libpng-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/libpng-$VERSION
cp -a \
- ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
- libpng*.txt example.c \
- $PKG/usr/doc/libpng-$VERSION
+ ANNOUNCE CHANGES INSTALL LICENSE README TODO libpng*.txt example.c \
+ $PKG/${PREFIX}/doc/libpng-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/libpng-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/libpng-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-}
-
-# Build the 1.2 version:
-VERSION=$VERSION_OLD
-build_source
-
-# Build the 1.4 version:
-VERSION=$VERSION_NEW
-build_source
-
-# Default the includes to version 1.4.x:
-( cd $PKG/usr/include ; ln -sf libpng14 libpng )
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/libpng-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/libpng.yypkg.script | sed \
+ -e "s/%{PKG}/libpng/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libpng/libpng.yypkg.script b/l/libpng/libpng.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libpng/libpng.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libsndfile/libsndfile.SlackBuild b/l/libsndfile/libsndfile.SlackBuild
index f06ff3b..8c3ff0d 100755
--- a/l/libsndfile/libsndfile.SlackBuild
+++ b/l/libsndfile/libsndfile.SlackBuild
@@ -40,17 +40,6 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP || exit 1
@@ -61,43 +50,55 @@ cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+#! PATCH
+#! libsndfile isn't using '-lvorbis -logg' but merely '-lvorbisenc'
+sed -i \
+ '/EXTERNAL_LIBS="\$FLAC_LIBS \$VORBISENC_LIBS \$SPEEX_LIBS"/ s/\$VORBISENC_LIBS/& $VORBIS_LIBS $OGG_LIBS/' \
+ configure
+# autoreconf -fiv
+
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --htmldir=/usr/doc/$PKGNAM-$VERSION/html \
+ --mandir=/${PREFIX}/man \
+ --docdir=/${PREFIX}/doc/$PKGNAM-$VERSION \
+ --htmldir=/${PREFIX}/doc/$PKGNAM-$VERSION/html \
--disable-static \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux
-make htmldocdir=/usr/doc/$PKGNAM-$VERSION/html || exit 1
-make htmldocdir=/usr/doc/$PKGNAM-$VERSION/html DESTDIR=$PKG install
+make htmldocdir=/${PREFIX}/doc/$PKGNAM-$VERSION/html || exit 1
+make htmldocdir=/${PREFIX}/doc/$PKGNAM-$VERSION/html DESTDIR=$PKG install
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+find $PKG/${PREFIX}/man -type f -exec gzip -9 {} \;
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* INSTALL NEWS README* \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
+cat ${CWD}/libsndfile.yypkg.script | sed \
+ -e "s/%{PKG}/libsndfile/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libsndfile/libsndfile.yypkg.script b/l/libsndfile/libsndfile.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libsndfile/libsndfile.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libsoup/libsoup-2.42.3.1-fix-build-without-ntml.patch b/l/libsoup/libsoup-2.42.3.1-fix-build-without-ntml.patch
new file mode 100644
index 0000000..a28951b
--- /dev/null
+++ b/l/libsoup/libsoup-2.42.3.1-fix-build-without-ntml.patch
@@ -0,0 +1,32 @@
+From f4bb23f1672f3274657912778eee93d70b3152c9 Mon Sep 17 00:00:00 2001
+From: Dan Winship <danw@gnome.org>
+Date: Thu, 17 Oct 2013 18:03:05 -0400
+Subject: soup-auth-ntlm: fix build with --without-ntlm-auth
+
+https://bugzilla.gnome.org/show_bug.cgi?id=710267
+
+diff --git a/libsoup/soup-auth-ntlm.c b/libsoup/soup-auth-ntlm.c
+index f76285e..2bebf42 100644
+--- a/libsoup/soup-auth-ntlm.c
++++ b/libsoup/soup-auth-ntlm.c
+@@ -309,13 +309,17 @@ soup_auth_ntlm_update_connection (SoupConnectionAuth *auth, SoupMessage *msg,
+ return TRUE;
+ }
+
++#ifdef USE_NTLM_AUTH
+ if (priv->sso_available) {
+ conn->state = SOUP_NTLM_SSO_FAILED;
+ priv->password_state = SOUP_NTLM_PASSWORD_NONE;
+ } else {
++#endif
+ conn->state = SOUP_NTLM_FAILED;
+ priv->password_state = SOUP_NTLM_PASSWORD_REJECTED;
++#ifdef USE_NTLM_AUTH
+ }
++#endif
+ return TRUE;
+ }
+
+--
+cgit v0.10.1
+
diff --git a/l/libsoup/libsoup.SlackBuild b/l/libsoup/libsoup.SlackBuild
index 8c7c7ca..47ae810 100755
--- a/l/libsoup/libsoup.SlackBuild
+++ b/l/libsoup/libsoup.SlackBuild
@@ -40,20 +40,6 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -63,14 +49,26 @@ cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-CFLAGS="$SLKCFLAGS" \
+#! PATCH
+sed -i 's/#include "soup-requester.h"/\0\n#include <string.h>/' libsoup/soup-request-file.c
+
+#! PATCH
+# Apply upstream patch to fix build without NTML. It's the only change from
+# 2.42.3 to 2.42.3.1 but there are no released tarballs for 2.42.3.1 (only git
+# archives without configure) so simply apply it by hand.
+patch -p1 --verbose < "${CWD}/libsoup-2.42.3.1-fix-build-without-ntml.patch"
+
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var/lib \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --localstatedir=/${PREFIX}/var/lib \
--disable-static \
--with-gnome \
+ --host=${HOST_TRIPLET} \
+ --without-apache-httpd \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
@@ -78,21 +76,25 @@ make install-strip DESTDIR=$PKG || exit 1
## NOTE: These _should_ go eventually, but for now it causes problems.
## Don't ship .la files:
-#rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+#rm -f $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/*.la
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a COPYING* AUTHORS NEWS README* $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
+cp -a COPYING* AUTHORS NEWS README* $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/l/libsoup/libsoup.yypkg.script b/l/libsoup/libsoup.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libsoup/libsoup.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libtasn1/libtasn1.SlackBuild b/l/libtasn1/libtasn1.SlackBuild
index d9fb3d8..c681b31 100755
--- a/l/libtasn1/libtasn1.SlackBuild
+++ b/l/libtasn1/libtasn1.SlackBuild
@@ -39,17 +39,6 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -63,17 +52,24 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+# Fix an issue in gnulib; upstream patch at
+# http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=86725346a1b116f3c2da26c124288f5f4495bf69
+# but libtasn1 (like wget) is still using an old copy of gnulib.
+find . -name 'msvc-inval.c' -exec sed -i 's/\<cdecl\>/__cdecl/' {} +
+
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
+ --mandir=/${PREFIX}/man \
+ --infodir=/${PREFIX}/info \
--enable-shared \
--disable-static \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux || exit 1
#--disable-gtk-doc \
@@ -81,14 +77,15 @@ make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
# Don't ship .la files:
-rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+rm -f $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/*.la
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -101,24 +98,27 @@ if [ -d $PKG/usr/man ]; then
)
fi
-rm -f $PKG/usr/info/dir
-gzip -9 $PKG/usr/info/*
+rm -f $PKG/${PREFIX}/info/dir
+gzip -9 $PKG/${PREFIX}/info/*
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* NEWS README* THANKS \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/$PKGNAM.yypkg.script | sed \
+ -e "s/%{PKG}/$PKGNAM/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libtasn1/libtasn1.yypkg.script b/l/libtasn1/libtasn1.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libtasn1/libtasn1.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libtheora/ax_prog_cc_for_build.m4 b/l/libtheora/ax_prog_cc_for_build.m4
new file mode 100644
index 0000000..77fd346
--- /dev/null
+++ b/l/libtheora/ax_prog_cc_for_build.m4
@@ -0,0 +1,125 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_PROG_CC_FOR_BUILD
+#
+# DESCRIPTION
+#
+# This macro searches for a C compiler that generates native executables,
+# that is a C compiler that surely is not a cross-compiler. This can be
+# useful if you have to generate source code at compile-time like for
+# example GCC does.
+#
+# The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything
+# needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).
+# The value of these variables can be overridden by the user by specifying
+# a compiler with an environment variable (like you do for standard CC).
+#
+# It also sets BUILD_EXEEXT and BUILD_OBJEXT to the executable and object
+# file extensions for the build platform, and GCC_FOR_BUILD to `yes' if
+# the compiler we found is GCC. All these variables but GCC_FOR_BUILD are
+# substituted in the Makefile.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 8
+
+AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
+AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_CPP])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+dnl Use the standard macros, but make them use other variable names
+dnl
+pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
+pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
+pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
+pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
+pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl
+pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl
+pushdef([ac_cv_objext], ac_cv_build_objext)dnl
+pushdef([ac_exeext], ac_build_exeext)dnl
+pushdef([ac_objext], ac_build_objext)dnl
+pushdef([CC], CC_FOR_BUILD)dnl
+pushdef([CPP], CPP_FOR_BUILD)dnl
+pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
+pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
+pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
+pushdef([host], build)dnl
+pushdef([host_alias], build_alias)dnl
+pushdef([host_cpu], build_cpu)dnl
+pushdef([host_vendor], build_vendor)dnl
+pushdef([host_os], build_os)dnl
+pushdef([ac_cv_host], ac_cv_build)dnl
+pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
+pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
+pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
+pushdef([ac_cv_host_os], ac_cv_build_os)dnl
+pushdef([ac_cpp], ac_build_cpp)dnl
+pushdef([ac_compile], ac_build_compile)dnl
+pushdef([ac_link], ac_build_link)dnl
+
+save_cross_compiling=$cross_compiling
+save_ac_tool_prefix=$ac_tool_prefix
+cross_compiling=no
+ac_tool_prefix=
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_EXEEXT
+
+ac_tool_prefix=$save_ac_tool_prefix
+cross_compiling=$save_cross_compiling
+
+dnl Restore the old definitions
+dnl
+popdef([ac_link])dnl
+popdef([ac_compile])dnl
+popdef([ac_cpp])dnl
+popdef([ac_cv_host_os])dnl
+popdef([ac_cv_host_vendor])dnl
+popdef([ac_cv_host_cpu])dnl
+popdef([ac_cv_host_alias])dnl
+popdef([ac_cv_host])dnl
+popdef([host_os])dnl
+popdef([host_vendor])dnl
+popdef([host_cpu])dnl
+popdef([host_alias])dnl
+popdef([host])dnl
+popdef([LDFLAGS])dnl
+popdef([CPPFLAGS])dnl
+popdef([CFLAGS])dnl
+popdef([CPP])dnl
+popdef([CC])dnl
+popdef([ac_objext])dnl
+popdef([ac_exeext])dnl
+popdef([ac_cv_objext])dnl
+popdef([ac_cv_exeext])dnl
+popdef([ac_cv_prog_cc_g])dnl
+popdef([ac_cv_prog_cc_cross])dnl
+popdef([ac_cv_prog_cc_works])dnl
+popdef([ac_cv_prog_gcc])dnl
+popdef([ac_cv_prog_CPP])dnl
+
+dnl Finally, set Makefile variables
+dnl
+BUILD_EXEEXT=$ac_build_exeext
+BUILD_OBJEXT=$ac_build_objext
+AC_SUBST(BUILD_EXEEXT)dnl
+AC_SUBST(BUILD_OBJEXT)dnl
+AC_SUBST([CFLAGS_FOR_BUILD])dnl
+AC_SUBST([CPPFLAGS_FOR_BUILD])dnl
+AC_SUBST([LDFLAGS_FOR_BUILD])dnl
+])
diff --git a/l/libtheora/libtheora.SlackBuild b/l/libtheora/libtheora.SlackBuild
index 1f8a1ab..487f21b 100755
--- a/l/libtheora/libtheora.SlackBuild
+++ b/l/libtheora/libtheora.SlackBuild
@@ -25,74 +25,69 @@ PKGNAM=libtheora
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
- esac
-fi
-
NUMJOBS=${NUMJOBS:-" -j7 "}
+set -e
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
mkdir -p $TMP $PKG
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
cd ${PKGNAM}-$VERSION
-# Make sure ownerships and permissions are sane:
chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+chmod -R u+w,go+r-w,a-s .
+
+#! PATCH
+find . -iname '*.def' -exec sed -i 's/\r//' {} +
+
+#! PATCH
+cp ${CWD}/ax_prog_cc_for_build.m4 m4
+sed -i '/^AC_PROG_CC$/ a AC_PROG_CC_FOR_BUILD' configure.ac
+sed -i \
+ -e '/^noinst_PROGRAMS = vp3huff$/ d' \
+ -e '/^vp3huff_SOURCES = vp3huff.c$/ d' \
+ -e '/^\t.\/vp3huff > $@$/ a vp3huff$(EXEEXT_FOR_BUILD):\n\t$(CC_FOR_BUILD) -o vp3huff$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) vp3huff.c' \
+ doc/spec/Makefile.am
+# Also need to add EXEEXT_FOR_BUILD in './vp3huff > $@' but no use for now and
+# we have no need for it, better make a patch to upstream
+
+#! PATCH
+# The configure file has syntax errors which disappear after re-generation.
+# Moreover it's needed for the patch above.
+autoreconf -fiv -I m4
# Configure:
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
--disable-static \
- --build=$ARCH-slackware-linux
+ --disable-examples \
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
# Build and install:
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
# Use the source, Luke.
-rm -rf $PKG/usr/share/doc
-rmdir $PKG/usr/share
+mkdir -p $PKG/${PREFIX}/doc
+mv $PKG/${PREFIX}/share/doc/${PKGNAM}-$VERSION $PKG/${PREFIX}/doc
+rm -rf $PKG/${PREFIX}/share
-# Strip binaries:
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -106,27 +101,25 @@ if [ -d $PKG/usr/man ]; then
fi
# Compress info files, if any:
-if [ -d $PKG/usr/info ]; then
- ( cd $PKG/usr/info
+if [ -d $PKG/${PREFIX}/info ]; then
+ ( cd $PKG/${PREFIX}/info
rm -f dir
gzip -9 *
)
fi
# Add a documentation directory:
-mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION
cp -a \
AUTHORS CHANGES COPYING LICENSE README \
- $PKG/usr/doc/${PKGNAM}-$VERSION
-
-cat << EOF > $PKG/usr/doc/${PKGNAM}-$VERSION/more-docs-in-source.txt
-See the docs directory in the source archive for more detailed
-technical documention.
-EOF
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $TMP/package-${PKGNAM}
-/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
+ $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION
+
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libtheora/libtheora.yypkg.script b/l/libtheora/libtheora.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libtheora/libtheora.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libtiff/libtiff.SlackBuild b/l/libtiff/libtiff.SlackBuild
index 7cdd7b7..26e1db2 100755
--- a/l/libtiff/libtiff.SlackBuild
+++ b/l/libtiff/libtiff.SlackBuild
@@ -35,23 +35,6 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-libtiff
@@ -75,48 +58,52 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
--program-prefix="" \
--program-suffix="" \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
( cd man ; make install-man DESTDIR=$PKG || exit 1 ) || exit 1
-rm -r $PKG/usr/share
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
-strip -g $PKG/usr/lib${LIBDIRSUFFIX}/lib*.a
-chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/libtiff*.so.*
-mkdir -p $PKG/usr/doc/libtiff-$VERSION
+rm -r $PKG/${PREFIX}/share
+find $PKG | xargs file | egrep "executable|shared object" | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
+
+rm -f $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/libtiff.a
+rm -f $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/libtiffxx.a
+chmod 755 $PKG/${PREFIX}/bin/libtiff*.dll
+mkdir -p $PKG/${PREFIX}/doc/libtiff-$VERSION
cp -a \
COPYRIGHT README RELEASE-DATE TODO VERSION \
- $PKG/usr/doc/libtiff-$VERSION
+ $PKG/${PREFIX}/doc/libtiff-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mv $PKG/usr/local/man $PKG/usr
-rmdir $PKG/usr/local
+mv $PKG/${PREFIX}/local/man $PKG/${PREFIX}
+rmdir $PKG/${PREFIX}/local
# I'd use that shiny new manpage script here but all the
# .3 manpages end with '.3tiff'.
-gzip -9 $PKG/usr/man/man?/*
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-makepkg -l y -c n $TMP/libtiff-$VERSION-$ARCH-$BUILD.txz
+gzip -9 $PKG/${PREFIX}/man/man?/*
+
+cat ${CWD}/libtiff.yypkg.script | sed \
+ -e "s/%{PKG}/libtiff/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libtiff/libtiff.yypkg.script b/l/libtiff/libtiff.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libtiff/libtiff.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libvorbis/libvorbis.SlackBuild b/l/libvorbis/libvorbis.SlackBuild
index be55587..734a50d 100755
--- a/l/libvorbis/libvorbis.SlackBuild
+++ b/l/libvorbis/libvorbis.SlackBuild
@@ -26,29 +26,7 @@ BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
- esac
-fi
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
+set -e
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -61,42 +39,44 @@ rm -rf libvorbis-$VERSION
tar xvf $CWD/libvorbis-$VERSION.tar.?z* || exit 1
cd libvorbis-$VERSION
chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+chmod -R u+w,go+r-w,a-s .
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
--disable-static \
- --build=$ARCH-slackware-linux
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-mv $PKG/usr/share/doc $PKG/usr
+mv $PKG/${PREFIX}/share/doc $PKG/${PREFIX}
cp -a \
- AUTHORS COPYING HACKING README \
- $PKG/usr/doc/libvorbis-$VERSION
+ AUTHORS COPYING README \
+ $PKG/${PREFIX}/doc/libvorbis-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/libvorbis-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/libvorbis.yypkg.script | sed \
+ -e "s/%{PKG}/libvorbis/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libvorbis/libvorbis.yypkg.script b/l/libvorbis/libvorbis.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libvorbis/libvorbis.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libxml2/libxml2.SlackBuild b/l/libxml2/libxml2.SlackBuild
index 1f44142..7cc66ae 100755
--- a/l/libxml2/libxml2.SlackBuild
+++ b/l/libxml2/libxml2.SlackBuild
@@ -25,38 +25,16 @@ PKGNAM=libxml2
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
- esac
-fi
-
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-libxml2
rm -rf $PKG
mkdir -p $TMP $PKG
+set -e
+
cd $TMP
rm -rf libxml2-$VERSION
tar xvf $CWD/libxml2-$VERSION.tar.?z* || exit 1
@@ -64,48 +42,49 @@ cd libxml2-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
+ -exec chmod 755 {} + -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ -exec chmod 644 {} +
-zcat $CWD/libxml2.do-not-check-crc.diff.gz | patch -p1 --verbose || exit 1
+# If --with-zlib isn't provided, ${Z_DIR} is empty and the following line
+# introduces an -L/lib during the build. On some recent systems which have
+# merged /usr and /, this will find libraries and will make the build fail.
+sed -i '/LDFLAGS="-L\${Z_DIR}\/lib"/ d' configure.ac
+autoreconf -fiv
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --build=$ARCH-slackware-linux
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
+ --without-python \
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-#echo
-#echo "Only the python bindings in /usr/lib/python__/site-packages/ should"
-#echo "be kept... toss the other stuff"
-#echo
+rm -f $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/libxml2.a
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-mv $PKG/usr/share/doc $PKG/usr
-mv $PKG/usr/doc/libxml2-python-$VERSION $PKG/usr/doc/libxml2-$VERSION
+mv $PKG/${PREFIX}/share/doc $PKG/${PREFIX}
cp -a \
AUTHORS COPYING* INSTALL NEWS README \
- $PKG/usr/doc/libxml2-$VERSION
-find $PKG/usr/doc/libxml2-$VERSION -type f | xargs chmod 644
-
-gzip -9 $PKG/usr/man/man?/*.?
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-# Be sure to clobber any .pyc files that might have been generated so that
-# the new .py files will be used instead of the already compiled copies
-cat << EOF > $PKG/install/doinst.sh
-rm -f /usr/lib${LIBDIRSUFFIX}/python2.7/site-packages/libxml2.pyc
-rm -f /usr/lib${LIBDIRSUFFIX}/python2.7/site-packages/drv_libxml2.pyc
-EOF
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/libxml2-$VERSION-$ARCH-$BUILD.txz
+ $PKG/${PREFIX}/doc/libxml2-$VERSION
+find $PKG/${PREFIX}/doc/libxml2-$VERSION -type f | xargs chmod 644
+
+gzip -9 $PKG/${PREFIX}/man/man?/*.?
+
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libxml2/libxml2.yypkg.script b/l/libxml2/libxml2.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libxml2/libxml2.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/libxslt/libxslt.SlackBuild b/l/libxslt/libxslt.SlackBuild
index 6ff4a41..5cb79f3 100755
--- a/l/libxslt/libxslt.SlackBuild
+++ b/l/libxslt/libxslt.SlackBuild
@@ -36,64 +36,64 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
-PKG=$TMP/package-libxslt
+PKG=$TMP/package-$PKGNAM
rm -rf $PKG
mkdir -p $TMP $PKG
+set -e
+
cd $TMP
-rm -rf libxslt-$VERSION
-tar xvf $CWD/libxslt-$VERSION.tar.?z* || exit 1
-cd libxslt-$VERSION
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
+ -exec chmod 755 {} + -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ -exec chmod 644 {} +
+
+#! PATCH
+sed -i -e 's/mkdir(directory, 0755);/mkdir(directory);/' libxslt/security.c
+
+#! PATCH
+sed -i '/^\tXML_CONFIG=xml2-config$/ s/xml2-config/${XML_CONFIG:-&}/' configure
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
+XML_CONFIG="/${PREFIX}/bin/xml2-config" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --build=$ARCH-slackware-linux
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
+ --disable-static \
+ --without-python \
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-mv $PKG/usr/share/doc $PKG/usr
-mv $PKG/usr/doc/libxslt-python-$VERSION $PKG/usr/doc/libxslt-$VERSION
+mv $PKG/${PREFIX}/share/doc $PKG/${PREFIX}
cp -a \
- AUTHORS COPYING* Copyright FEATURES INSTALL IPR NEWS README TODO libxslt.spec \
- $PKG/usr/doc/libxslt-$VERSION
-find $PKG/usr/doc/libxslt-$VERSION -type f | xargs chmod 644
-
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-
-gzip -9 $PKG/usr/man/man?/*.?
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-#echo
-#echo "Only the python bindings in /usr/lib/python__/site-packages/ should"
-#echo "be kept... toss the other stuff"
-#echo
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/libxslt-$VERSION-$ARCH-$BUILD.txz
+ AUTHORS COPYING* Copyright FEATURES INSTALL NEWS README TODO $PKGNAM.spec \
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
+find $PKG/${PREFIX}/doc/$PKGNAM-$VERSION -type f | xargs chmod 644
+
+find $PKG | xargs file | egrep "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
+
+gzip -9 $PKG/${PREFIX}/man/man?/*.?
+
+cat ${CWD}/$PKGNAM.yypkg.script | sed \
+ -e "s/%{PKG}/$PKGNAM/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/libxslt/libxslt.yypkg.script b/l/libxslt/libxslt.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/libxslt/libxslt.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/mozilla-nss/mozilla-nss.SlackBuild b/l/mozilla-nss/mozilla-nss.SlackBuild
index 65f3256..3ecede7 100755
--- a/l/mozilla-nss/mozilla-nss.SlackBuild
+++ b/l/mozilla-nss/mozilla-nss.SlackBuild
@@ -82,7 +82,7 @@ find . \
-exec chmod 644 {} \;
echo Building ...
-export LDFLAGS="-lz"
+export LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX} -lz"
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
export BUILD_OPT=1
diff --git a/l/mpfr/mpfr-3.1.2.tar.xz.sig b/l/mpfr/mpfr-3.1.2.tar.xz.sig
deleted file mode 100644
index 90916ef..0000000
--- a/l/mpfr/mpfr-3.1.2.tar.xz.sig
+++ /dev/null
Binary files differ
diff --git a/l/mpfr/mpfr.SlackBuild b/l/mpfr/mpfr.SlackBuild
index 1e56ba3..c014a33 100755
--- a/l/mpfr/mpfr.SlackBuild
+++ b/l/mpfr/mpfr.SlackBuild
@@ -40,26 +40,9 @@ if [ -z "$ARCH" ]; then
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
- LIBDIRSUFFIX=""
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
case "$ARCH" in
- arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
- *) TARGET=$ARCH-slackware-linux ;;
+ arm*) BUILD_TRIPLET=$ARCH-slackware-linux-gnueabi ;;
+ *) BUILD_TRIPLET=$ARCH-slackware-linux ;;
esac
CWD=$(pwd)
@@ -89,50 +72,48 @@ if [ ! -z "$(ls $CWD/patches/* 2> /dev/null)" ]; then
done
fi
-# End of preparations
-if echo "$*" | grep -qw -- --prep ; then
- exit 0
-fi
-
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --infodir=/usr/info \
- --docdir=/usr/doc/mpfr-$VERSION \
- --enable-static=yes \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --infodir=/${PREFIX}/info \
+ --docdir=/${PREFIX}/doc/mpfr-$VERSION \
+ --enable-static=no \
--enable-shared=yes \
- --build=$TARGET
+ --host=${HOST_TRIPLET} \
+ --build=$BUILD_TRIPLET
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-
-# Hardly a savings doing this...
-#strip -g $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-rm -f $PKG/usr/info/dir
-gzip -9 $PKG/usr/info/*
+rm -f $PKG/${PREFIX}/info/dir
+gzip -9 $PKG/${PREFIX}/info/*
-mkdir -p $PKG/usr/doc/mpfr-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/mpfr-$VERSION
cp -a \
AUTHORS BUGS COPYING* FAQ.html INSTALL NEWS README* TODO VERSION \
examples \
- $PKG/usr/doc/mpfr-$VERSION
+ $PKG/${PREFIX}/doc/mpfr-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/mpfr-${VERSION}${PATCHLEVEL}-${ARCH}-${BUILD}.txz
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/mpfr/mpfr.yypkg.script b/l/mpfr/mpfr.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/mpfr/mpfr.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/pango/pango.SlackBuild b/l/pango/pango.SlackBuild
index 9934c55..be1c238 100755
--- a/l/pango/pango.SlackBuild
+++ b/l/pango/pango.SlackBuild
@@ -34,20 +34,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
NUMJOBS=${NUMJOBS:-" -j7 "}
CWD=$(pwd)
@@ -55,7 +41,7 @@ TMP=${TMP:-/tmp}
PKG=$TMP/package-pango
rm -rf $PKG
-mkdir -p $TMP $PKG/usr
+mkdir -p $TMP $PKG/${PREFIX}
cd $TMP
rm -rf pango-$VERSION
tar xvf $CWD/pango-$VERSION.tar.?z* || exit 1
@@ -69,75 +55,43 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fix for x86_64 (does not hurt the other archs but note that we will start
-# using /etc/pango/$host instead of /etc/pango/ now):
-zcat $CWD/pango.etc.host.location.diff.gz | patch -p1 --verbose || exit 1
-
-# Autoconf changes linux to linux-gnu.
-# Our host is $ARCH-slackware-linux not $ARCH-slackware-linux-gnu:
-sed -i -e 's#linux|linux-gnu|#linux|linux|#' config.sub
+# PATCH
+sed -i \
+ "/g_build_filename (root, \"lib..pango\", NULL);/ s/lib/lib${LIBDIRSUFFIX}/" \
+ pango/pango-utils.c
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --mandir=/usr/man \
- --docdir=/usr/doc/pango-$VERSION \
- --with-xft \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --mandir=/${PREFIX}/man \
+ --docdir=/${PREFIX}/doc/pango-$VERSION \
--build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux \
+ --host=${HOST_TRIPLET} \
--target=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
-# Check the host value that is passed to the compile to the one in this script:
-host="$ARCH-slackware-linux"
-compile_host=$(grep 'host_triplet =' pango/Makefile | sed "s/.* = //")
-if [ "x$compile_host" != "x$host" ]; then
- echo "Host mismatch: compile='$compile_host', SlackBuild='$host'" && exit 1
-fi
-
make install DESTDIR=$PKG || exit 1
-# Install wrapper for pango-querymodules:
-cp $CWD/update-pango-querymodules $PKG/usr/bin/update-pango-querymodules
-chmod 0755 $PKG/usr/bin/update-pango-querymodules
-
-# Do not remove pangox.aliases
-rm -f $PKG/etc/pango/pango.modules
-mkdir -p $PKG/etc/pango/$host
-touch $PKG/etc/pango/$host/pango.modules
-
-# We need to have separate 32-bit and 64-bit binaries
-# for places where we have two copies of the GTK+ package installed.
-# (we might have x86_64 and i486 packages on the same system, for example.)
-case "$host" in
- s390x*|x86_64*)
- mv $PKG/usr/bin/pango-querymodules $PKG/usr/bin/pango-querymodules-64
- ( cd $PKG/usr/bin ; ln -sf pango-querymodules-64 pango-querymodules )
- ;;
- *)
- mv $PKG/usr/bin/pango-querymodules $PKG/usr/bin/pango-querymodules-32
- ( cd $PKG/usr/bin ; ln -sf pango-querymodules-32 pango-querymodules )
- ;;
-esac
-
-mkdir -p $PKG/install
-cat <<EOF > $PKG/install/doinst.sh
-# Updating the pango.modules file:
-chroot . /sbin/ldconfig 2> /dev/null
-if [ -x /usr/bin/update-pango-querymodules ]; then
- /usr/bin/update-pango-querymodules
-fi
-EOF
+# mkdir -p $PKG/install
+# cat <<EOF > $PKG/install/doinst.sh
+# # Updating the pango.modules file:
+# chroot . /sbin/ldconfig 2> /dev/null
+# if [ -x /${PREFIX}/bin/update-pango-querymodules ]; then
+# /${PREFIX}/bin/update-pango-querymodules
+# fi
+# EOF
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -150,15 +104,23 @@ if [ -d $PKG/usr/man ]; then
)
fi
-mkdir -p $PKG/usr/doc/pango-$VERSION
+# Create the etc/pango directory to avoid having to do it during the package
+# installation. I couldn't figure out how to do it in the SFX installer so I'm
+# doing it here.
+mkdir -p $PKG/${PREFIX}/etc/pango
+
+mkdir -p $PKG/${PREFIX}/doc/pango-$VERSION
cp -a \
AUTHORS COPYING* NEWS README* TODO \
- $PKG/usr/doc/pango-$VERSION
-ln -s /usr/share/gtk-doc/html/pango $PKG/usr/doc/pango-$VERSION/html
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n --prepend $TMP/pango-$VERSION-$ARCH-$BUILD.txz
+ $PKG/${PREFIX}/doc/pango-$VERSION
+ln -s /${PREFIX}/share/gtk-doc/html/pango $PKG/${PREFIX}/doc/pango-$VERSION/html
+
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/pango/pango.etc.host.location.diff.gz b/l/pango/pango.etc.host.location.diff.gz
deleted file mode 100644
index 135f903..0000000
--- a/l/pango/pango.etc.host.location.diff.gz
+++ /dev/null
Binary files differ
diff --git a/l/pango/pango.yypkg.script b/l/pango/pango.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/pango/pango.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/pango/update-pango-querymodules b/l/pango/update-pango-querymodules
deleted file mode 100644
index 5aefa03..0000000
--- a/l/pango/update-pango-querymodules
+++ /dev/null
@@ -1,85 +0,0 @@
-#! /bin/sh
-# Updates the pango.modules in /etc/pango/$host
-
-umask 022
-
-# Get the machine type from uname:
-host=$(uname -m)-slackware-linux
-
-# Fix $host for arm arch:
-case "$host" in
- arm*) host=arm-slackware-linux-gnueabi ;;
-esac
-
-# Deriving /etc/pango/$host location
-#
-# We have had problems in the past with build systems
-# changing host from i386 to i686 and appending/dropping
-# the -gnu suffix, so try to match up the $host we got
-# with whats actually there.
-if [ ! -d /etc/pango/$host ]; then
- case "$host" in
- i?86*)
- for d in $(ls -d /etc/pango/i?86*); do
- host=$(basename $d)
- break
- done
- ;;
- esac
-fi
-
-FILE=/etc/pango/$host/pango.modules
-
-case "$host" in
- s390x*|x86_64*)
- if [ -x /usr/bin/pango-querymodules-64 ]; then
- if [ "$1" = "--verbose" ]; then
- echo "Updating pango.modules for ${host}:"
- echo " /usr/bin/pango-querymodules-64 \\"
- echo " > $FILE"
- fi
- /usr/bin/pango-querymodules-64 > $FILE
- # Check for x86_64 multilib:
- if ls -d /etc/pango/i?86* 1> /dev/null 2> /dev/null ; then
- for d in $(ls -d /etc/pango/i?86*); do
- mlhost=$(basename $d)
- break
- done
- if [ -r /etc/pango/$mlhost/pango.modules -a -x /usr/bin/pango-querymodules-32 ]; then
- FILE=/etc/pango/$mlhost/pango.modules
- if [ "$1" = "--verbose" ]; then
- echo "Updating pango.modules for ${mlhost}:"
- echo " /usr/bin/pango-querymodules-32 \\"
- echo " > $FILE"
- fi
- /usr/bin/pango-querymodules-32 > $FILE
- fi
- fi
- else
- if [ "$1" = "--verbose" ]; then
- echo "Updating pango.modules for ${host}:"
- echo " /usr/bin/pango-querymodules \\"
- echo " > $FILE"
- fi
- /usr/bin/pango-querymodules > $FILE
- fi
- ;;
- *)
- if [ -x /usr/bin/pango-querymodules-32 ]; then
- if [ "$1" = "--verbose" ]; then
- echo "Updating pango.modules for ${host}:"
- echo " /usr/bin/pango-querymodules-32 \\"
- echo " > $FILE"
- fi
- /usr/bin/pango-querymodules-32 > $FILE
- else
- if [ "$1" = "--verbose" ]; then
- echo "Updating pango.modules for ${host}:"
- echo " /usr/bin/pango-querymodules \\"
- echo " > $FILE"
- fi
- /usr/bin/pango-querymodules > $FILE
- fi
- ;;
-esac
-
diff --git a/l/pcre/pcre.SlackBuild b/l/pcre/pcre.SlackBuild
index 2454c9f..976d7c9 100755
--- a/l/pcre/pcre.SlackBuild
+++ b/l/pcre/pcre.SlackBuild
@@ -37,20 +37,6 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-pcre
@@ -71,32 +57,33 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
--enable-utf8 \
--enable-pcre16 \
--enable-pcre32 \
--enable-unicode-properties \
+ --disable-static \
+ --host=${HOST_TRIPLET} \
--build=$ARCH-slackware-linux
-CFLAGS="$SLKCFLAGS" make $NUMJOBS || make || exit 1
+CFLAGS="-O2" make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/libpcre.so.* \
- $PKG/usr/lib${LIBDIRSUFFIX}/libpcreposix.so.*
+chmod 755 $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/libpcre.so.* \
+ $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/libpcreposix.so.*
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null
-)
+find $PKG | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Compress and if needed symlink the man pages:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+if [ -d $PKG/${PREFIX}/man ]; then
+ ( cd $PKG/${PREFIX}/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
@@ -110,26 +97,29 @@ if [ -d $PKG/usr/man ]; then
fi
# Eliminate redundant docs:
-rm -rf $PKG/usr/share/doc
-rmdir $PKG/usr/share
+rm -rf $PKG/${PREFIX}/share/doc
+rmdir $PKG/${PREFIX}/share
-mkdir -p $PKG/usr/doc/pcre-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/pcre-$VERSION
cp -a \
AUTHORS COPYING* INSTALL HACKING LICENCE NEWS NON-UNIX-USE README* \
- $PKG/usr/doc/pcre-$VERSION
-( cd doc ; cp -a Tech.Notes html $PKG/usr/doc/pcre-$VERSION )
+ $PKG/${PREFIX}/doc/pcre-$VERSION
+( cd doc ; cp -a Tech.Notes html $PKG/${PREFIX}/doc/pcre-$VERSION )
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/pcre-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/pcre.yypkg.script | sed \
+ -e "s/%{PKG}/pcre/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/pcre/pcre.yypkg.script b/l/pcre/pcre.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/pcre/pcre.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/qt/0001-QCoreApplication-ibraryPaths-discovers-plugpath-rela.patch b/l/qt/0001-QCoreApplication-ibraryPaths-discovers-plugpath-rela.patch
new file mode 100644
index 0000000..cef9b8f
--- /dev/null
+++ b/l/qt/0001-QCoreApplication-ibraryPaths-discovers-plugpath-rela.patch
@@ -0,0 +1,38 @@
+From 62403408303a6055a9563b34c973d4fd20994d37 Mon Sep 17 00:00:00 2001
+From: Adrien Nader <adrien@notk.org>
+Date: Wed, 14 Jan 2015 23:16:55 +0100
+Subject: [PATCH] QCoreApplication: ibraryPaths() discovers plugpath relative
+ to Qt5Core.dll.
+
+---
+ qtbase/src/corelib/kernel/qcoreapplication.cpp | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/qtbase/src/corelib/kernel/qcoreapplication.cpp b/qtbase/src/corelib/kernel/qcoreapplication.cpp
+index 6868eb6..952c6ab 100644
+--- a/qtbase/src/corelib/kernel/qcoreapplication.cpp
++++ b/qtbase/src/corelib/kernel/qcoreapplication.cpp
+@@ -2408,6 +2408,20 @@ QStringList QCoreApplication::libraryPaths()
+ if (!app_libpaths->contains(installPathPlugins))
+ app_libpaths->append(installPathPlugins);
+ }
++#ifdef _WIN32
++ HMODULE phModule;
++ QString installPathQtCoreDll;
++ if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCTSTR) QCoreApplication::libraryPaths, &phModule)) {
++ char qt_core_path[512];
++ DWORD ret = GetModuleFileNameA(phModule, qt_core_path, sizeof(qt_core_path));
++ if (ret > 0 && ret < sizeof(qt_core_path)) {
++ QString p = QString(qt_core_path);
++ QString pp = QFileInfo(p).dir().filePath(QString("../plugins"));
++ QString ppp = QDir(pp).canonicalPath();
++ app_libpaths->append(ppp);
++ }
++ }
++#endif
+
+ // If QCoreApplication is not yet instantiated,
+ // make sure we add the application path when we construct the QCoreApplication
+--
+1.8.4
+
diff --git a/l/qt/0001-configure-use-pkg-config-for-libpng.patch b/l/qt/0001-configure-use-pkg-config-for-libpng.patch
new file mode 100644
index 0000000..7d0bfa9
--- /dev/null
+++ b/l/qt/0001-configure-use-pkg-config-for-libpng.patch
@@ -0,0 +1,53 @@
+From a20597023b3d7cf39a48634917edcf2fe30ac41e Mon Sep 17 00:00:00 2001
+From: Adrien Nader <adrien@notk.org>
+Date: Thu, 6 Feb 2014 23:14:11 +0100
+Subject: [PATCH 1/3] configure: use pkg-config for libpng.
+
+---
+ qtbase/configure | 16 +++++++++++++---
+ qtbase/src/gui/image/qpnghandler.pri | 1 +
+ 2 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/qtbase/configure b/qtbase/configure
+index a330dd6..272dbda 100755
+--- a/qtbase/configure
++++ b/qtbase/configure
+@@ -4411,10 +4411,20 @@ fi
+
+ # detect png
+ if [ "$CFG_LIBPNG" = "auto" ]; then
+- if compileTest unix/libpng "libpng"; then
+- CFG_LIBPNG=system
++ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libpng 2>/dev/null; then
++ QT_CFLAGS_LIBPNG=`$PKG_CONFIG --cflags libpng 2>/dev/null`
++ QT_LIBS_LIBPNG=`$PKG_CONFIG --libs libpng 2>/dev/null`
+ else
+- CFG_LIBPNG=qt
++ QT_CFLAGS_LIBPNG=
++ QT_LIBS_LIBPNG="-lpng"
++ fi
++ if compileTest unix/libpng "libpng" $QT_CFLAGS_LIBPNG; then
++ QT_CONFIG="$QT_CONFIG libpng"
++ QMakeVar set QMAKE_CFLAGS_LIBPNG "$QT_CFLAGS_LIBPNG"
++ QMakeVar set QMAKE_LIBS_LIBPNG "$QT_LIBS_LIBPNG"
++ CFG_LIBPNG=system
++ else
++ CFG_LIBPNG=qt
+ fi
+ fi
+
+diff --git a/qtbase/src/gui/image/qpnghandler.pri b/qtbase/src/gui/image/qpnghandler.pri
+index bedf23f..bcc8f62 100644
+--- a/qtbase/src/gui/image/qpnghandler.pri
++++ b/qtbase/src/gui/image/qpnghandler.pri
+@@ -2,6 +2,7 @@ INCLUDEPATH *= $$PWD
+ HEADERS += $$PWD/qpnghandler_p.h
+ SOURCES += $$PWD/qpnghandler.cpp
+ contains(QT_CONFIG, system-png) {
++ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_LIBPNG
+ if(unix|mingw): LIBS_PRIVATE += -lpng
+ else:win32: LIBS += libpng.lib
+
+--
+1.8.4
+
diff --git a/l/qt/0002-Use-widl-instead-of-midl.-Also-set-QMAKE_DLLTOOL-to-.patch b/l/qt/0002-Use-widl-instead-of-midl.-Also-set-QMAKE_DLLTOOL-to-.patch
new file mode 100644
index 0000000..8cfcb11
--- /dev/null
+++ b/l/qt/0002-Use-widl-instead-of-midl.-Also-set-QMAKE_DLLTOOL-to-.patch
@@ -0,0 +1,29 @@
+From 2112fbba9efb67caadf7064e44f68ac98ee89843 Mon Sep 17 00:00:00 2001
+From: Adrien Nader <adrien@notk.org>
+Date: Sat, 8 Feb 2014 00:31:41 +0100
+Subject: [PATCH 2/3] Use widl instead of midl. Also set QMAKE_DLLTOOL to
+ dlltool.
+
+---
+ qtbase/mkspecs/win32-g++/qmake.conf | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/qtbase/mkspecs/win32-g++/qmake.conf b/qtbase/mkspecs/win32-g++/qmake.conf
+index d514b6d..73bc91f 100644
+--- a/qtbase/mkspecs/win32-g++/qmake.conf
++++ b/qtbase/mkspecs/win32-g++/qmake.conf
+@@ -102,9 +102,10 @@ QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
+ include(../common/shell-win32.conf)
+ }
+
+-QMAKE_IDL = midl
++QMAKE_IDL = $${CROSS_COMPILE}widl
+ QMAKE_LIB = $${CROSS_COMPILE}ar -ru
+ QMAKE_RC = $${CROSS_COMPILE}windres
++QMAKE_DLLTOOL = $${CROSS_COMPILE}dlltool
+
+ QMAKE_STRIP = $${CROSS_COMPILE}strip
+ QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+--
+1.8.4
+
diff --git a/l/qt/0003-Tell-qmake-to-use-pkg-config.patch b/l/qt/0003-Tell-qmake-to-use-pkg-config.patch
new file mode 100644
index 0000000..1ea51e6
--- /dev/null
+++ b/l/qt/0003-Tell-qmake-to-use-pkg-config.patch
@@ -0,0 +1,24 @@
+From 7041ac8be4245debc4af462dfe2fbd0da0e5ba60 Mon Sep 17 00:00:00 2001
+From: Adrien Nader <adrien@notk.org>
+Date: Sun, 9 Feb 2014 23:53:41 +0100
+Subject: [PATCH 3/3] Tell qmake to use pkg-config.
+
+---
+ qtbase/mkspecs/win32-g++/qmake.conf | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/qtbase/mkspecs/win32-g++/qmake.conf b/qtbase/mkspecs/win32-g++/qmake.conf
+index 73bc91f..a8a0066 100644
+--- a/qtbase/mkspecs/win32-g++/qmake.conf
++++ b/qtbase/mkspecs/win32-g++/qmake.conf
+@@ -111,4 +111,7 @@ QMAKE_STRIP = $${CROSS_COMPILE}strip
+ QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
+ QMAKE_NM = $${CROSS_COMPILE}nm -P
++
++PKG_CONFIG = pkg-config
++
+ load(qt_config)
+--
+1.8.4
+
diff --git a/l/qt/config-native b/l/qt/config-native
new file mode 100644
index 0000000..291313c
--- /dev/null
+++ b/l/qt/config-native
@@ -0,0 +1,53 @@
+export CONFIGURE_OPTIONS=" \
+ -no-sql-sqlite \
+ -no-sql-mysql \
+ -no-sql-psql \
+ -no-qml-debug \
+ -no-mtdev \
+ -no-journald \
+ -no-gif \
+ -no-libpng \
+ -no-libjpeg \
+ -no-harfbuzz \
+ -no-openssl \
+ -no-xinput2 \
+ -no-xcb-xlib \
+ -no-iconv \
+ -no-evdev \
+ -no-icu \
+ -no-xcb \
+ -no-opengl \
+ -no-accessibility \
+ -no-pulseaudio \
+ -no-alsa \
+ -no-dbus \
+ -no-egl \
+ -no-linuxfb \
+ -no-qpa-platform-guard \
+ -no-sm \
+ -no-libudev \
+ -skip qtactiveqt \
+ -skip qtconnectivity \
+ -skip qtdeclarative \
+ -skip qtdoc \
+ -skip qtenginio \
+ -skip qtgraphicaleffects \
+ -skip qtimageformats \
+ -skip qtlocation \
+ -skip qtmultimedia \
+ -skip qtquick1 \
+ -skip qtquickcontrols \
+ -skip qtscript \
+ -skip qtsensors \
+ -skip qtserialport \
+ -skip qtsvg \
+ -skip qttranslations \
+ -skip qtwebkit \
+ -skip qtwebkit-examples \
+ -skip qtwebsockets \
+ -skip qtxmlpatterns \
+"
+
+export YYLOWCOMPRESS="1"
+
+export HACKY_DISABLES="widgets gui printsupport platformsupport plugins network testlib sql concurrent"
diff --git a/l/qt/config-regular b/l/qt/config-regular
new file mode 100644
index 0000000..692c730
--- /dev/null
+++ b/l/qt/config-regular
@@ -0,0 +1,14 @@
+export CONFIGURE_OPTIONS=" \
+ -system-libjpeg \
+ -system-zlib \
+ -system-sqlite \
+ -system-pcre \
+ -system-harfbuzz \
+ -plugin-sql-sqlite \
+ -dbus \
+ -force-pkg-config \
+ -xplatform win32-g++ \
+ -device-option CROSS_COMPILE="${HOST_TRIPLET}-" \
+"
+
+export HACKY_DISABLES=""
diff --git a/l/qt/qt.SlackBuild b/l/qt/qt.SlackBuild
index abc3e79..69d676b 100755
--- a/l/qt/qt.SlackBuild
+++ b/l/qt/qt.SlackBuild
@@ -40,59 +40,25 @@
# qt 4.7.3, 4.7.4, 4.8.0, 4.8.1, 4.8.2, 4.8.4 are built from original nokia sources.
PKGNAM=qt
-VERSION=$(ls qt-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+VERSION=${VERSION:-$(ls qt-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
-if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
-fi
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-elif [ "$ARCH" = "armv7hl" ]; then
- # To prevent "qatomic_armv6.h error: output number 2 not directly addressable"
- # More permanent solution is to patch gcc:
- # http://bazaar.launchpad.net/~linaro-toolchain-dev/gcc-linaro/4.6/revision/106731
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -fno-strict-volatile-bitfields"
- LIBDIRSUFFIX=""
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
-case "$ARCH" in
- arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
- *) TARGET=$ARCH-slackware-linux ;;
-esac
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf qt-everywhere-opensource-src-$VERSION
tar xvf $CWD/qt-everywhere-opensource-src-$VERSION.tar.xz # For qt releases
-cd qt-everywhere-opensource-src-$VERSION || exit 1
-
+cd qt-everywhere-opensource-src-$VERSION
+# We have to use rpath here as the library which the
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -100,64 +66,213 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-if [ $ARCH = "i486" ]; then
- sed -i -e "s/QMAKE_CFLAGS_RELEASE += -O2/QMAKE_CFLAGS_RELEASE += $SLKCFLAGS/" mkspecs/common/gcc-base.conf || exit 1
-fi
-
# Fix path to mysql header
-zcat $CWD/qt.mysql.h.diff.gz | patch -p1 --verbose || exit 1
+# zcat $CWD/qt.mysql.h.diff.gz | patch -p1 --verbose || exit 1
# Stupid idea - remove it:
-zcat $CWD/qt.webkit-no_Werror.patch.gz | patch -p1 --verbose || exit 1
+# zcat $CWD/qt.webkit-no_Werror.patch.gz | patch -p1 --verbose || exit 1
+
+#! PATCH
+sed -i 's/Shlwapi.h/shlwapi.h/' qttools/src/windeployqt/utils.cpp
+
+#! PATCH
+case "${HOST_TRIPLET}" in
+ *-*-mingw*)
+ cat $CWD/0001-configure-use-pkg-config-for-libpng.patch \
+ | patch -p1 --verbose
+ cat $CWD/0002-Use-widl-instead-of-midl.-Also-set-QMAKE_DLLTOOL-to-.patch \
+ | patch -p1 --verbose
+
+ cat $CWD/qt5-dont-add-resource-files-to-qmake-libs.patch \
+ | ( cd qtbase && patch -p1 --verbose )
+ cat $CWD/qt5-qmake-implib-dll-a.patch \
+ | ( cd qtbase && patch -p1 --verbose )
+
+ sed -i '/option.host_build./ d' qtactiveqt/src/tools/idc/idc.pro
+
+ cat $CWD/0001-QCoreApplication-ibraryPaths-discovers-plugpath-rela.patch \
+ | patch -p1 --verbose
+
+ EXEEXT=".exe"
+ ;;
+ *)
+ EXEEXT=""
+ ;;
+esac
# Fix crash on malformed GIF images (CVE-2014-0190):
-zcat $CWD/qt.fix.broken.gif.crash.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/qt.fix.broken.gif.crash.diff.gz | patch -p1 --verbose
-export CFLAGS="$SLKCFLAGS"
-export CXXFLAGS="$SLKCFLAGS"
-export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
-./configure \
+export CFLAGS="-O2"
+export CXXFLAGS="-O2"
+export OPENSOURCE_CXXFLAGS="-O2"
+
+MAKEFLAGS="${NUMJOBS}" ./configure \
-confirm-license \
-opensource \
- -prefix /usr/lib${LIBDIRSUFFIX}/qt \
- -fast \
- -system-libpng \
- -system-libjpeg \
- -system-zlib \
- -system-sqlite \
- -plugin-sql-sqlite \
- -dbus \
- -webkit \
- -no-phonon \
+ -prefix /${PREFIX} \
+ -headerdir /${PREFIX}/include/qt5 \
+ -libdir /${PREFIX}/lib${LIBDIRSUFFIX} \
+ -no-compile-examples \
-nomake examples \
- -nomake demos \
- -nomake docs \
+ -nomake tests \
+ -no-kms \
+ -no-cups \
+ -no-gtkstyle \
+ -no-glib \
+ -no-fontconfig \
+ ${CONFIGURE_OPTIONS} \
+ -release \
+ -optimized-qmake \
-no-separate-debug-info \
-no-pch
# No-precompiled-headers is ccache-friendly.
+# Kill building of some sub-modules that cannot be disabled through configure.
+# In particular this makes it possible to not build GUI and widgets code while
+# still having 'uic' built.
+# 70% reduction in build time for tools-only builds in addition to the gains
+# through the various -skip configure parameters (which cut the build times in
+# half).
+for p in ${HACKY_DISABLES}; do
+ printf 'all:\n\ttrue\n\ninstall:\n\ttrue\n' > "qtbase/src/${p}/Makefile"
+done
+
# Sometimes a failure happens when parallelizing make. Try again if make fails,
# but make a failure the second time around (single threaded) a fatal error:
-make $NUMJOBS || make || exit 1
-make install INSTALL_ROOT=$PKG || exit 1
+make $NUMJOBS || make
+make install INSTALL_ROOT=$PKG
+
+case "${HOST_TRIPLET}" in
+ *-*-mingw*)
+ if [ x"${HOST_TRIPLET}" != x"${BUILD_TRIPLET}" ]; then
+ (cd qtbase/qmake
+ make clean
+ make \
+ CC=${HOST_TRIPLET}-gcc \
+ CXX=${HOST_TRIPLET}-g++ \
+ QMAKESPEC=${PWD}/../mkspecs/win32-g++ \
+ EXTRA_CPPFLAGS=-DUNICODE \
+ QMAKE_LFLAGS="-lole32 -luuid -ladvapi32 -lkernel32" \
+ EXEEXT="${EXEEXT}" \
+ QTOBJS='qfilesystemengine_win.o qfilesystemiterator_win.o qfsfileengine_win.o qlocale_win.o registry.o qsettings_win.o qsystemlibrary.o' \
+ $NUMJOBS
+ install -m 755 ../bin/qmake${EXEEXT} $PKG/${PREFIX}/bin
+ )
+
+ tool() {
+ local TOOL_PATH="${1}"
+ local TOOL="${2:-""}"
+ if [ -n "${TOOL}" ]; then
+ local TARGET="${TOOL}${EXEEXT}"
+ local WITH_TARGET="TARGET=${TARGET}"
+ else
+ local TARGET=""
+ local WITH_TARGET=""
+ fi
+
+ make -C ${TOOL_PATH}/${TOOL} clean
+
+ sed -i '/INCPATH \+=/ s/linux-g++/win32-g++/g' ${TOOL_PATH}/${TOOL}/Makefile
+
+ make -C ${TOOL_PATH}/${TOOL} \
+ CC="${HOST_TRIPLET}-gcc" \
+ CXX="${HOST_TRIPLET}-g++" \
+ LINK='$(CXX)' \
+ AR="${HOST_TRIPLET}-ar cqs" \
+ ${WITH_TARGET} \
+ LIBS="-L${PWD}/qtbase/lib ${EXTRA_LIBS} -lQt5Core" \
+ LFLAGS="-Wl,-O1" \
+ CFLAGS="-O2 -fno-exceptions -Wall -W -D_REENTRANT "'$(DEFINES)'" -DUNICODE ${EXTRA_CPPFLAGS}" \
+ CXXFLAGS="-O2 -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT "'$(DEFINES)'" -DUNICODE ${EXTRA_CPPFLAGS}" \
+ $NUMJOBS
+
+ if [ -n "${TARGET}" ]; then
+ install -m 755 "${TOOL_PATH}/${TOOL}/${TARGET}" "$PKG/${PREFIX}/bin"
+ fi
+ }
+
+ tool "qtbase/src/tools" moc
+ tool "qtbase/src/tools" rcc
+ tool "qtbase/src/tools" qlalr
+ EXTRA_LIBS="-lQt5Xml" \
+ tool "qtbase/src/tools" qdoc
+ tool "qtbase/src/tools" uic
+ EXTRA_LIBS="-lQt5DBus" \
+ tool "qtbase/src/tools" qdbusxml2cpp
+ EXTRA_LIBS="-lQt5DBus" EXTRA_CPPFLAGS="$(pkg-config --cflags dbus-1)" \
+ tool "qtbase/src/tools" qdbuscpp2xml
+
+ EXTRA_LIBS="-lshlwapi" \
+ tool "qttools/src" windeployqt
+ EXTRA_LIBS="-lQt5Xml" \
+ tool "qttools/src/linguist" lconvert
+ EXTRA_LIBS="-lQt5Xml" \
+ tool "qttools/src/linguist" lrelease
+ EXTRA_LIBS="-L../../../../qtdeclarative/lib -lQt5Qml -lQt5Xml" \
+ tool "qttools/src/linguist" lupdate
+
+ EXTRA_LIBS="-L../../lib -lQt5Qml" \
+ tool "qtdeclarative/tools" qmlimportscanner
+ EXTRA_LIBS="-L../../lib -lQt5Qml" \
+ tool "qtdeclarative/src/qmldevtools" ""
+ EXTRA_LIBS="-L../../lib -lQt5QmlDevTools -lQt5Qml" \
+ tool "qtdeclarative/tools" qmlmin
+
+ (cd $PKG/${PREFIX}/bin
+ rm -f lconvert lrelease lupdate moc qdbuscpp2xml qdbusxml2cpp qdoc qlalr
+ rm -f qmake qmlimportscanner qmlmin rcc uic windeployqt
+ )
+ fi
+ ;;
+esac
+
+# Qt isn't redeployable by default: it is full of hardcoded paths and values.
+# We need to create a file named "qt.conf" for it not to look into
+# "/opt/windows_??" when running on Windows.
+# Credits to Cristian Adams at
+# http://cristianadam.blogspot.fr/2012/06/portable-qmake.html with the change
+# that qmake will look for "qt.conf" and not "qmake.conf" (probably a
+# difference in Qt5; spotted through ProcessMonitor).
+cat > $PKG/${PREFIX}/bin/qt.conf << EOF
+[Paths]
+ Prefix=..
+ Headers=include/qt5
+EOF
+
+# qmake is a pile of assumptions written in stone during its compilation. For
+# cross-compile, we will have to put a "qt.conf" file next to it, telling it
+# not to look in the current installation prefix (and provide env vars for the
+# specs file lookup but that doesn't matter here).
+# Since the configuration we want is for cross-toolchain, we can only add it
+# during the cross_toolchain series. The issue is that qt.conf is searched for
+# at basically "$(dirname argv[1])/qt.conf", i.e. it will be
+# ${YYPREFIX_NATIVE}/bin/qt.conf. Fortunately for us it doesn't do any check
+# related to symlinks so we add a symlink from ${YYPREFIX_CROSS}/bin/qmake to
+# the binary in the native prefix. This however requires the cross prefix to
+# always be before the native one in ${PATH} and this is simply too risky so in
+# addition to that, we rename the qmake binary in native_toolchain in order to
+# "poison" it. This is fine since it is only to be used for win-builds.
+if [ x"${TARGET_TRIPLET}" = x"${HOST_TRIPLET}" ] && [ x"${TARGET_TRIPLET}" = x"${BUILD_TRIPLET}" ]; then
+ mv ${PKG}/${PREFIX}/bin/qmake ${PKG}/${PREFIX}/bin/qmake-poisoned
+fi
# The infamous qt -> qt-${VERSION} link that keeps the full path out of .la files:
-( cd $PKG/usr/lib${LIBDIRSUFFIX} ; ln -sf qt qt-${VERSION} )
+( cd $PKG/${PREFIX}/lib${LIBDIRSUFFIX} ; ln -sf qt qt-${VERSION} )
# Add a missing Qt.pc which is needed by KDE applications:
-mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig
-cat <<EOF > $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/Qt.pc
-prefix=/usr/lib${LIBDIRSUFFIX}/qt
+mkdir -p $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig
+cat <<EOF > $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/Qt.pc
+prefix=/${PREFIX}
bindir=\${prefix}/bin
datadir=\${prefix}
docdir=\${prefix}/doc
headerdir=\${prefix}/include
importdir=\${prefix}/imports
-libdir=\${prefix}/lib
-moc=\${bindir}/moc
+libdir=\${prefix}/lib${LIBDIRSUFFIX}
+moc=\${bindir}/moc${EXEEXT}
plugindir=\${prefix}/plugins
-qmake=\${bindir}/qmake
-sysconfdir=\${prefix}/etc/settings
+qmake=\${bindir}/qmake${EXEEXT}
translationdir=\${prefix}/translations
Name: Qt
@@ -166,76 +281,76 @@ Version: $VERSION
EOF
# libjscore is used internally. Prevent a false dependency on this in the .la and .pc files:
-sed -i "s,-ljscore,,g" $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/*.la $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/*.pc
-sed -i "s,-L../JavaScriptCore/release,,g" $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/*.la $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/*.pc
+# sed -i "s,-ljscore,,g" $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/*.pc
+# sed -i "s,-L../JavaScriptCore/release,,g" $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/*.pc
# libwebcore is used internally. Prevent a false dependency on this in the .la and .pc files:
-sed -i \
- -e "s#-L/usr/lib${LIBDIRSUFFIX}/qt/lib -L../../WebCore/release -L../../JavaScriptCore/release -L/usr/X11R6/lib$LIBDIRSUFFIX -lwebcore##g" \
- -e "s#-L/usr/lib${LIBDIRSUFFIX}/qt/lib -L../../WebCore/release -L../../JavaScriptCore/release -L/usr/X11R6/lib -lwebcore##g" \
- -e "s# -lwebcore##g" \
- $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/libQtWebKit.la $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/QtWebKit.pc
-
-# Link the shared libraries into /usr/lib:
-( cd $PKG/usr/lib${LIBDIRSUFFIX}
- for file in qt/lib/*.so* ; do
- ln -sf $file .
- done
-)
-
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# sed -i \
+# -e "s#-L/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib -L../../WebCore/release -L../../JavaScriptCore/release -L/${PREFIX}/X11R6/lib$LIBDIRSUFFIX -lwebcore##g" \
+# -e "s#-L/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib -L../../WebCore/release -L../../JavaScriptCore/release -L/${PREFIX}/X11R6/lib -lwebcore##g" \
+# -e "s# -lwebcore##g" \
+# $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/libQtWebKit.la $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/QtWebKit.pc
+
+# Link the shared libraries into /${PREFIX}/lib:
+# ( cd $PKG/${PREFIX}/lib${LIBDIRSUFFIX}
+# for file in qt/lib/*.so* ; do
+# ln -sf $file .
+# done
+# )
+
+find $PKG -size +4k -type f | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
# Add profile scripts
-mkdir -p $PKG/etc/profile.d
-sed -e "s#usr/lib/#usr/lib${LIBDIRSUFFIX}/#g" $CWD/profile.d/qt4.sh \
- > $PKG/etc/profile.d/qt4.sh
-sed -e "s#usr/lib/#usr/lib${LIBDIRSUFFIX}/#g" $CWD/profile.d/qt4.csh \
- > $PKG/etc/profile.d/qt4.csh
-chmod 0755 $PKG/etc/profile.d/*
-
-# Put a ton of links to more "normal" places. I'd just use a prefix of /usr, but it
-# creates a ton of new (and ambiguously named) /usr directories...
-mkdir -p $PKG/usr/bin
-( cd $PKG/usr/lib${LIBDIRSUFFIX}/qt/bin
- for file in * ; do
- ( cd $PKG/usr/bin ; ln -sf /usr/lib${LIBDIRSUFFIX}/qt/bin/$file . )
- done
-)
-
-mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
-( cd $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig
- for file in *.pc ; do
- ( cd $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig ; ln -sf /usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/$file . )
- done
-)
+# mkdir -p $PKG/etc/profile.d
+# sed -e "s#${PREFIX}/lib/#${PREFIX}/lib${LIBDIRSUFFIX}/#g" $CWD/profile.d/qt4.sh \
+# > $PKG/etc/profile.d/qt4.sh
+# sed -e "s#${PREFIX}/lib/#${PREFIX}/lib${LIBDIRSUFFIX}/#g" $CWD/profile.d/qt4.csh \
+# > $PKG/etc/profile.d/qt4.csh
+# chmod 0755 $PKG/etc/profile.d/*
+
+# Put a ton of links to more "normal" places. I'd just use a prefix of /${PREFIX}, but it
+# creates a ton of new (and ambiguously named) /${PREFIX} directories...
+# mkdir -p $PKG/${PREFIX}/bin
+# ( cd $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/bin
+# for file in * ; do
+# ( cd $PKG/${PREFIX}/bin ; ln -sf /${PREFIX}/lib${LIBDIRSUFFIX}/qt/bin/$file . )
+# done
+# )
+
+# mkdir -p $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig
+# ( cd $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig
+# for file in *.pc ; do
+# ( cd $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig ; ln -sf /${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/$file . )
+# done
+# )
# Install Qt's private headers - at least Gentoo and Fedora are adding these
# and some software has (inevitably) started depending on them:
# We're using `rsync -R` as easy way to preserve relative path names:
-rsync -aR \
- include/Qt{Core,Declarative,Gui,Script}/private \
- src/{corelib,declarative,gui,script}/*/*_p.h \
- ${PKG}/usr/lib${LIBDIRSUFFIX}/qt/
+
+ln -s 5.3.1/QtCore/private qtbase/include/QtCore/private
+ln -s 5.3.1/QtGui/private qtbase/include/QtGui/private
# Add menu entries for all those hidden but great Qt applications:
# Qt logo:
-convert $PKG/usr/lib$LIBDIRSUFFIX/qt/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt-logo.png
-convert $PKG/usr/lib$LIBDIRSUFFIX/qt/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt-logo.png
+mkdir -p $PKG/${PREFIX}/share/icons/hicolor/48x48/apps/
+convert qtdoc/doc/src/images/qt-logo.png -resize 48x48 $PKG/${PREFIX}/share/icons/hicolor/48x48/apps/qt-logo.png
# Assistant icons
-install -p -m644 -D tools/assistant/tools/assistant/images/assistant.png $PKG/usr/share/icons/hicolor/32x32/apps/assistant.png
-install -p -m644 -D tools/assistant/tools/assistant/images/assistant-128.png $PKG/usr/share/icons/hicolor/128x128/apps/assistant.png
+install -p -m644 -D qttools/src/assistant/assistant/images/assistant.png $PKG/${PREFIX}/share/icons/hicolor/32x32/apps/assistant.png
+install -p -m644 -D qttools/src/assistant/assistant/images/assistant-128.png $PKG/${PREFIX}/share/icons/hicolor/128x128/apps/assistant.png
# Designer icon
-install -p -m644 -D tools/designer/src/designer/images/designer.png $PKG/usr/share/icons/hicolor/128x128/apps/designer.png
+install -p -m644 -D qttools/src/designer/src/designer/images/designer.png $PKG/${PREFIX}/share/icons/hicolor/128x128/apps/designer.png
# Linguist icons
-for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
+for icon in qttools/src/linguist/linguist/images/icons/linguist-*-32.png ; do
size=$(echo $(basename ${icon}) | cut -d- -f2)
- install -p -m644 -D ${icon} $PKG/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png
+ install -p -m644 -D ${icon} $PKG/${PREFIX}/share/icons/hicolor/${size}x${size}/apps/linguist.png
done
# And the .desktop files
-mkdir -p $PKG/usr/share/applications
-cat <<EOF > $PKG/usr/share/applications/designer.desktop
+mkdir -p $PKG/${PREFIX}/share/applications
+cat <<EOF > $PKG/${PREFIX}/share/applications/designer.desktop
[Desktop Entry]
Name=Qt4 Designer
GenericName=Interface Designer
@@ -248,7 +363,7 @@ Encoding=UTF-8
Type=Application
Categories=Qt;Development;
EOF
-cat <<EOF > $PKG/usr/share/applications/assistant.desktop
+cat <<EOF > $PKG/${PREFIX}/share/applications/assistant.desktop
[Desktop Entry]
Name=Qt4 Assistant
Comment=Shows Qt4 documentation and examples
@@ -259,7 +374,7 @@ Encoding=UTF-8
Type=Application
Categories=Qt;Development;Documentation;
EOF
-cat <<EOF > $PKG/usr/share/applications/linguist.desktop
+cat <<EOF > $PKG/${PREFIX}/share/applications/linguist.desktop
[Desktop Entry]
Name=Qt4 Linguist
Comment=Add translations to Qt4 applications
@@ -271,7 +386,7 @@ Encoding=UTF-8
Type=Application
Categories=Qt;Development;
EOF
-cat <<EOF > $PKG/usr/share/applications/qtconfig.desktop
+cat <<EOF > $PKG/${PREFIX}/share/applications/qtconfig.desktop
[Desktop Entry]
Name=Qt4 Config
Comment=Configure Qt4 behavior, styles, fonts
@@ -284,19 +399,20 @@ Categories=Qt;Settings;
EOF
# Add a documentation directory:
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a *GPL_EXCEPTION* FAQ* INSTALL KNOWN* LICENSE* README* changes-* \
- $PKG/usr/doc/$PKGNAM-$VERSION
-if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/qt/doc/html ]; then
- ( cd $PKG/usr/doc/$PKGNAM-$VERSION
- ln -sf /usr/lib${LIBDIRSUFFIX}/qt/doc/html .
+mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
+cp -a *GPL_EXCEPTION* LICENSE* README* \
+ $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
+if [ -d $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/doc/html ]; then
+ ( cd $PKG/${PREFIX}/doc/$PKGNAM-$VERSION
+ ln -sf /${PREFIX}/lib${LIBDIRSUFFIX}/qt/doc/html .
)
fi
-mkdir -p $PKG/install
-zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/qt/qt.fix.broken.gif.crash.diff.gz b/l/qt/qt.fix.broken.gif.crash.diff.gz
index 0f77b80..f900310 100644
--- a/l/qt/qt.fix.broken.gif.crash.diff.gz
+++ b/l/qt/qt.fix.broken.gif.crash.diff.gz
Binary files differ
diff --git a/l/qt/qt.yypkg.script b/l/qt/qt.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/qt/qt.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/qt/qt5-dont-add-resource-files-to-qmake-libs.patch b/l/qt/qt5-dont-add-resource-files-to-qmake-libs.patch
new file mode 100644
index 0000000..b348429
--- /dev/null
+++ b/l/qt/qt5-dont-add-resource-files-to-qmake-libs.patch
@@ -0,0 +1,11 @@
+--- qtbase-opensource-src-5.2.0/qmake/generators/win32/mingw_make.cpp.orig 2014-01-04 21:18:07.413328813 +0100
++++ qtbase-opensource-src-5.2.0/qmake/generators/win32/mingw_make.cpp 2014-01-04 21:18:55.740126515 +0100
+@@ -254,7 +254,7 @@
+ processVars();
+
+ if (!project->values("RES_FILE").isEmpty()) {
+- project->values("QMAKE_LIBS") += escapeFilePaths(project->values("RES_FILE"));
++ project->values("OBJECTS") += escapeFilePaths(project->values("RES_FILE"));
+ }
+
+ ProStringList &configs = project->values("CONFIG");
diff --git a/l/qt/qt5-dont-build-host-libs-static.patch b/l/qt/qt5-dont-build-host-libs-static.patch
new file mode 100644
index 0000000..9e430e4
--- /dev/null
+++ b/l/qt/qt5-dont-build-host-libs-static.patch
@@ -0,0 +1,19 @@
+--- mkspecs/features/qt_module.prf.orig 2013-07-31 20:37:56.789883201 +0200
++++ mkspecs/features/qt_module.prf 2013-07-31 20:38:06.013034478 +0200
+@@ -25,7 +25,7 @@
+
+ # Compile as shared/DLL or static according to the option given to configure
+ # unless overridden. Host builds are always static
+-host_build|staticlib: CONFIG += static
++staticlib: CONFIG += static
+
+ host_build {
+ QT -= gui # no host module will ever use gui
+--- src/tools/bootstrap-dbus/bootstrap-dbus.pro.orig 2013-12-08 11:09:47.000000000 -0600
++++ src/tools/bootstrap-dbus/bootstrap-dbus.pro 2014-01-05 23:06:13.575543400 -0600
+@@ -30,4 +30,4 @@
+ ../../dbus/qdbusunixfiledescriptor.cpp
+
+ lib.CONFIG = dummy_install
+-INSTALLS = lib
++INSTALLS += lib
diff --git a/l/qt/qt5-qmake-implib-dll-a.patch b/l/qt/qt5-qmake-implib-dll-a.patch
new file mode 100644
index 0000000..5947656
--- /dev/null
+++ b/l/qt/qt5-qmake-implib-dll-a.patch
@@ -0,0 +1,33 @@
+--- a/qmake/generators/win32/mingw_make.cpp 2013-08-25 13:04:06.000000000 -0500
++++ b/qmake/generators/win32/mingw_make.cpp 2014-01-02 01:24:31.640046700 -0600
+@@ -71,7 +71,7 @@ QString MingwMakefileGenerator::escapeDe
+
+ QString MingwMakefileGenerator::getLibTarget()
+ {
+- return QString("lib" + project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".a");
++ return QString("lib" + project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".dll.a");
+ }
+
+ bool MingwMakefileGenerator::findLibraries()
+@@ -274,7 +274,7 @@ void MingwMakefileGenerator::init()
+ if(!project->first("DESTDIR").isEmpty())
+ destDir = Option::fixPathToTargetOS(project->first("DESTDIR") + Option::dir_sep, false, false);
+ project->values("MINGW_IMPORT_LIB").prepend(destDir + "lib" + project->first("TARGET")
+- + project->first("TARGET_VERSION_EXT") + ".a");
++ + project->first("TARGET_VERSION_EXT") + ".dll.a");
+ project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + project->first("MINGW_IMPORT_LIB"));
+ }
+
+--- a/mkspecs/features/create_cmake.prf.cmake 2013-10-22 10:49:28.000000000 +0200
++++ b/mkspecs/features/create_cmake.prf 2013-10-23 21:38:02.959762089 +0200
+@@ -207,8 +207,8 @@
+ CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
+ } else {
+- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
+- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
++ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.dll.a
++ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.dll.a
+ }
+ } else {
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
diff --git a/l/qt/qt5-use-system-zlib-in-host-libs.patch b/l/qt/qt5-use-system-zlib-in-host-libs.patch
new file mode 100644
index 0000000..2ea9a5e
--- /dev/null
+++ b/l/qt/qt5-use-system-zlib-in-host-libs.patch
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
+<head>
+<title>mingw-qt5-qtbase.git - mingw-qt5-qtbase</title>
+<meta name='generator' content='cgit v0.9.2'/>
+<meta name='robots' content='index, nofollow'/>
+<link rel='stylesheet' type='text/css' href='/cgit-data/cgit.css'/>
+<link rel='alternate' title='Atom feed' href='http://pkgs.fedoraproject.org/cgit/mingw-qt5-qtbase.git/atom/qt5-use-system-zlib-in-host-libs.patch?h=master' type='application/atom+xml'/>
+</head>
+<body>
+<div id='cgit'><table id='header'>
+<tr>
+<td class='logo' rowspan='2'><a href='/cgit/'><img src='/cgit-data/cgit.png' alt='cgit logo'/></a></td>
+<td class='main'><a href='/cgit/'>index</a> : <a title='mingw-qt5-qtbase.git' href='/cgit/mingw-qt5-qtbase.git/'>mingw-qt5-qtbase.git</a></td><td class='form'><form method='get' action=''>
+<select name='h' onchange='this.form.submit();'>
+<option value='f17'>f17</option>
+<option value='f18'>f18</option>
+<option value='f19'>f19</option>
+<option value='f20'>f20</option>
+<option value='master' selected='selected'>master</option>
+</select> <input type='submit' name='' value='switch'/></form></td></tr>
+<tr><td class='sub'>mingw-qt5-qtbase</td><td class='sub right'>Jon Ciesla</td></tr></table>
+<table class='tabs'><tr><td>
+<a href='/cgit/mingw-qt5-qtbase.git/'>summary</a><a href='/cgit/mingw-qt5-qtbase.git/refs/'>refs</a><a href='/cgit/mingw-qt5-qtbase.git/log/qt5-use-system-zlib-in-host-libs.patch'>log</a><a class='active' href='/cgit/mingw-qt5-qtbase.git/tree/qt5-use-system-zlib-in-host-libs.patch'>tree</a><a href='/cgit/mingw-qt5-qtbase.git/commit/qt5-use-system-zlib-in-host-libs.patch'>commit</a><a href='/cgit/mingw-qt5-qtbase.git/diff/qt5-use-system-zlib-in-host-libs.patch'>diff</a><a href='/cgit/mingw-qt5-qtbase.git/stats/qt5-use-system-zlib-in-host-libs.patch'>stats</a></td><td class='form'><form class='right' method='get' action='/cgit/mingw-qt5-qtbase.git/log/qt5-use-system-zlib-in-host-libs.patch'>
+<select name='qt'>
+<option value='grep'>log msg</option>
+<option value='author'>author</option>
+<option value='committer'>committer</option>
+<option value='range'>range</option>
+</select>
+<input class='txt' type='text' size='10' name='q' value=''/>
+<input type='submit' value='search'/>
+</form>
+</td></tr></table>
+<div class='path'>path: <a href='/cgit/mingw-qt5-qtbase.git/tree/'>root</a>/<a href='/cgit/mingw-qt5-qtbase.git/tree/qt5-use-system-zlib-in-host-libs.patch'>qt5-use-system-zlib-in-host-libs.patch</a></div><div class='content'>blob: eccd9e490d61c059b797010a14f30c7fefc57db4 (<a href='/cgit/mingw-qt5-qtbase.git/plain/qt5-use-system-zlib-in-host-libs.patch'>plain</a>)
+<table summary='blob content' class='blob'>
+<tr><td class='linenumbers'><pre><a class='no' id='n1' name='n1' href='#n1'>1</a>
+<a class='no' id='n2' name='n2' href='#n2'>2</a>
+<a class='no' id='n3' name='n3' href='#n3'>3</a>
+<a class='no' id='n4' name='n4' href='#n4'>4</a>
+<a class='no' id='n5' name='n5' href='#n5'>5</a>
+<a class='no' id='n6' name='n6' href='#n6'>6</a>
+<a class='no' id='n7' name='n7' href='#n7'>7</a>
+<a class='no' id='n8' name='n8' href='#n8'>8</a>
+<a class='no' id='n9' name='n9' href='#n9'>9</a>
+<a class='no' id='n10' name='n10' href='#n10'>10</a>
+<a class='no' id='n11' name='n11' href='#n11'>11</a>
+</pre></td>
+<td class='lines'><pre><code>--- a/src/tools/bootstrap/bootstrap.pro 2014-01-01 13:22:42.367935800 -0600
++++ b/src/tools/bootstrap/bootstrap.pro 2014-01-02 23:38:20.707687700 -0600
+@@ -148,7 +148,7 @@ macx {
+
+ *-g++*: QMAKE_CXXFLAGS += -ffunction-sections
+
+-if(contains(QT_CONFIG, zlib)|cross_compile):include(../../3rdparty/zlib.pri)
++if(contains(QT_CONFIG, zlib)):include(../../3rdparty/zlib.pri)
+ else:include(../../3rdparty/zlib_dependency.pri)
+
+ win32:LIBS += -luser32 -lole32 -ladvapi32
+</code></pre></td></tr></table>
+</div> <!-- class=content -->
+<div class='footer'>generated by cgit v0.9.2 at 2014-02-04 19:42:00 (GMT)</div>
+</div> <!-- id=cgit -->
+</body>
+</html>
diff --git a/l/qt/qt5-workaround-qtbug-29426.patch b/l/qt/qt5-workaround-qtbug-29426.patch
new file mode 100644
index 0000000..0422571
--- /dev/null
+++ b/l/qt/qt5-workaround-qtbug-29426.patch
@@ -0,0 +1,12 @@
+--- src/corelib/tools/qsimd_p.h.orig 2013-02-07 20:31:43.010726116 +0100
++++ src/corelib/tools/qsimd_p.h 2013-02-07 20:35:14.324371318 +0100
+@@ -142,7 +142,8 @@
+
+ // other x86 intrinsics
+ #if defined(QT_COMPILER_SUPPORTS_AVX) && defined(Q_CC_GNU) && \
+- (!defined(Q_CC_INTEL)|| __INTEL_COMPILER >= 1310 || (__GNUC__ * 100 + __GNUC_MINOR__ < 407))
++ (!defined(Q_CC_INTEL)|| __INTEL_COMPILER >= 1310 || (__GNUC__ * 100 + __GNUC_MINOR__ < 407)) && \
++ (defined(__i386__) || defined(__x86_64__))
+ #define QT_COMPILER_SUPPORTS_X86INTRIN
+ #include <x86intrin.h>
+ #endif
diff --git a/l/sdl/config-base b/l/sdl/config-base
new file mode 100644
index 0000000..44c5837
--- /dev/null
+++ b/l/sdl/config-base
@@ -0,0 +1 @@
+export SDL_BUILD=""
diff --git a/l/sdl/config-image b/l/sdl/config-image
new file mode 100644
index 0000000..61db5fe
--- /dev/null
+++ b/l/sdl/config-image
@@ -0,0 +1 @@
+export SDL_BUILD=image
diff --git a/l/sdl/config-mixer b/l/sdl/config-mixer
new file mode 100644
index 0000000..1f7a6b0
--- /dev/null
+++ b/l/sdl/config-mixer
@@ -0,0 +1 @@
+export SDL_BUILD=mixer
diff --git a/l/sdl/config-net b/l/sdl/config-net
new file mode 100644
index 0000000..d4289fa
--- /dev/null
+++ b/l/sdl/config-net
@@ -0,0 +1 @@
+export SDL_BUILD=net
diff --git a/l/sdl/config-ttf b/l/sdl/config-ttf
new file mode 100644
index 0000000..0ee92ba
--- /dev/null
+++ b/l/sdl/config-ttf
@@ -0,0 +1 @@
+export SDL_BUILD=ttf
diff --git a/l/sdl/sdl.SlackBuild b/l/sdl/sdl.SlackBuild
index 70c203a..cc88049 100755
--- a/l/sdl/sdl.SlackBuild
+++ b/l/sdl/sdl.SlackBuild
@@ -40,214 +40,152 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
+COMMON_CONFIGURE_OPTIONS=" \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --mandir=/${PREFIX}/man \
+ --host="${HOST_TRIPLET}" \
+ --enable-shared=yes \
+ --enable-static=no"
+
+PKGNAM="sdl${SDL_BUILD:+"-${SDL_BUILD}"}"
+PKG="/tmp/package-${PKGNAM}"
+
+case "${SDL_BUILD}" in
+ "image") PACKAGE="SDL_image-${IMAGE}" ;;
+ "net") PACKAGE="SDL_net-${NET}" ;;
+ "ttf") PACKAGE="SDL_ttf-${TTF}" ;;
+ "mixer") PACKAGE="SDL_mixer-${MIXER}" ;;
+ "") PACKAGE="SDL-${VERSION}" ;;
+esac
+
+case "${SDL_BUILD}" in
+ "image") EXTRA_CONFIGURE_ARGS=" \
+ --enable-jpg-shared=no \
+ --enable-png-shared=no \
+ --enable-tif-shared=no" ;;
+ *) EXTRA_CONFIGURE_ARGS="" ;;
+esac
+
+update_libtool() {
+ LIBTOOL_RC='/bin/sh libtool --mode=compile --tag=RC'
+ if [ -e build-scripts/makedep.sh ]; then
+ sed -i \
+ -e 's;\\\$(WINDRES) \$src \\\$@;'"${LIBTOOL_RC}"' \\$(WINDRES) -i $src -o \\$@;' \
+ -e '/if test x"\$ext" = x"rc"; then/,/fi/ { /\<if\|else\|fi\|\\1\.o\>/ d }' \
+ build-scripts/makedep.sh
+ else
+ sed -i \
+ -e '/%.o : %.rc/ s;%\.o;%.lo;' \
+ -e 's;\$(WINDRES) \$< \$@;'"${LIBTOOL_RC}"' $(WINDRES) -i $< -o $@;' \
+ -e '/libSDL_[a-z]\+_la_DEPENDENCIES/ s;version\.o;version.lo;' \
+ -e 's;-Wl,version.o;-Wl,.libs/version.o;' \
+ Makefile.am
+
+ sed -i -e '/IMG_LIBS=/ s/-lpng/-lpng14/' configure.in
+ fi
+
+ sed -i \
+ -e 's/\(AC_CHECK_PROGS(WINDRES, \[\)\(windres\) \($hostaliaswindres\) \($host_os-windres\)\])/\1\3 \2 \4])/' \
+ -e '/OBJECTS=`echo \$OBJECTS.*\.rc.*\\1.o/ s/\\1\.o/\\1.lo/' \
+ configure.in
+
+ touch NEWS AUTHORS ChangeLog
+ autoreconf -vif -I /usr/share/aclocal/ -I acinclude
+}
CWD=$(pwd)
TMP=${TMP:-/tmp}
-PKG=$TMP/package-sdl
-
-rm -rf $PKG
-mkdir -p $TMP $PKG
-cd $TMP
-rm -rf sdl-$VERSION
-tar xf $CWD/SDL-$VERSION.tar.?z* || exit 1
-cd SDL-$VERSION || exit 1
-chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-zcat $CWD/libsdl-1.2.15-resizing.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/sdl-1.2.14-fix-mouse-clicking.patch.gz | patch -p1 --verbose || exit 1
-
-# We must use --disable-x11-shared or programs linked with SDL will
-# crash on machines that use the closed source nVidia drivers.
-
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --disable-arts \
- --disable-esd \
- --enable-shared=yes \
- --enable-static=no \
- --disable-x11-shared
-
-make $NUMJOBS || make || exit 1
-# Spam /, for mixer/image later on:
-make install
-# install to package:
-make install DESTDIR=$PKG || exit 1
-mkdir -p $PKG/usr/doc/SDL-$VERSION/html
-cp -a docs/index.html $PKG/usr/doc/SDL-$VERSION
-cp -a docs/html/*.html $PKG/usr/doc/SDL-$VERSION/html
-cp -a \
- BUGS COPYING CREDITS INSTALL README* TODO WhatsNew \
- $PKG/usr/doc/SDL-$VERSION
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-# Add SDL_image:
-cd $TMP
-rm -rf SDL_image-$IMAGE
-tar xf $CWD/SDL_image-$IMAGE.tar.?z* || exit 1
-cd SDL_image-$IMAGE
-chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# we don't want sdl to load the libs with dlopen(), gcc is smarter...
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --enable-shared=yes \
- --enable-static=no \
- --enable-jpg-shared=no \
- --enable-png-shared=no \
- --enable-tif-shared=no
+set -u
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
-mkdir -p $PKG/usr/doc/SDL_image-$IMAGE
-cp -a \
- CHANGES COPYING README \
- $PKG/usr/doc/SDL_image-$IMAGE
+rm -rf $PKG $TMP/sdl-$VERSION
+mkdir -p $TMP $PKG
-# Add SDL_mixer:
cd $TMP
-rm -rf SDL_mixer-$MIXER
-tar xf $CWD/SDL_mixer-$MIXER.tar.?z* || exit 1
-cd SDL_mixer-$MIXER
-
-# Fix default library path. Don't use /usr/local, and use lib64 where needed:
-sed -i "s,usr/local/lib,usr/lib${LIBDIRSUFFIX},g" timidity/config.h
-
-# Install patched static libmikmod:
-unzip libmikmod-3.1.12.zip
-( cd libmikmod-3.1.12.patched
- ./configure \
- --prefix=/usr/local \
- --libdir=/usr/local/lib${LIBDIRSUFFIX} \
- --with-pic \
- --enable-shared=no \
- --enable-static=yes
- make $NUMJOBS || make || exit 1
- make install
-)
+rm -rf "${PACKAGE}"
+tar xf $CWD/${PACKAGE}.tar.?z* || exit 1
+cd "${PACKAGE}" || exit 1
chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --enable-music-mod \
- --enable-shared=yes \
- --enable-static=no
-
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
-
-mkdir -p $PKG/usr/doc/SDL_mixer-$MIXER
-cp -a \
- CHANGES COPYING README \
- $PKG/usr/doc/SDL_mixer-$MIXER
+chmod -R u+w,go+r-w,a-s .
-# We do not want to try to pull in -lmikmod, since that was linked static:
-sed -i -e "s/ -lmikmod//g" $PKG/usr/lib${LIBDIRSUFFIX}/libSDL_mixer.la
-
-# Add SDL_net:
-cd $TMP
-rm -rf SDL_net-$NET
-tar xf $CWD/SDL_net-$NET.tar.?z* || exit 1
-cd SDL_net-$NET
-chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --enable-shared=yes \
- --enable-static=no
-
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
-
-mkdir -p $PKG/usr/doc/SDL_net-$NET
-cp -a \
- CHANGES COPYING README \
- $PKG/usr/doc/SDL_net-$NET
-
-# Add SDL_ttf:
-cd $TMP
-rm -rf SDL_ttf-$TTF
-tar xf $CWD/SDL_ttf-$TTF.tar.?z* || exit 1
-cd SDL_ttf-$TTF
+if [ -z "${SDL_BUILD}" ]; then
+ for p in libsdl-1.2.15-resizing sdl-1.2.14-fix-mouse-clicking; do
+ zcat $CWD/$p.patch.gz | patch -p1 --verbose 1>&2 || exit 1
+ done
+fi
-#zcat $CWD/SDL_ttf-2.0.8-noftinternals.diff.gz | patch -p1 --verbose || exit 1
+update_libtool
-chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --enable-shared=yes \
- --enable-static=no
+CFLAGS="-O2" \
+LDFLAGS="-L/${PREFIX}/lib${LIBDIRSUFFIX}" \
+ ./configure ${COMMON_CONFIGURE_OPTIONS} ${EXTRA_CONFIGURE_ARGS}
make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
-
-mkdir -p $PKG/usr/doc/SDL_ttf-$TTF
-cp -a \
- CHANGES COPYING README \
- $PKG/usr/doc/SDL_ttf-$TTF
-
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-
-gzip -9 $PKG/usr/man/man?/*.?
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/sdl-$VERSION-$ARCH-$BUILD.txz
+make install DESTDIR="${PKG}" || exit 1
+
+if [ -z "${SDL_BUILD}" ]; then
+ sed -i \
+ -e 's/^Libs:.*/Libs: -L${libdir} -lSDL/' \
+ -e '/^Cflags:/ s/-Dmain=SDL_main//' \
+ ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/sdl.pc
+
+ sed -i \
+ -e 's/^#define main\tSDL_main/#ifdef SDL_REDEFINE_MAIN\n\0\n#endif/' \
+ ${PKG}/${PREFIX}/include/SDL/SDL_main.h
+
+ mkdir -p $PKG/${PREFIX}/doc/SDL-$VERSION/html
+ cp -a docs/index.html $PKG/${PREFIX}/doc/SDL-$VERSION
+ cp -a docs/html/*.html $PKG/${PREFIX}/doc/SDL-$VERSION/html
+ cp -a \
+ BUGS COPYING CREDITS INSTALL README* TODO WhatsNew \
+ $PKG/${PREFIX}/doc/SDL-$VERSION
+fi
+# mkdir -p ${PKG}/${PREFIX}/doc/${PKGNAM}
+# cp -a CHANGES COPYING README ${PKG}/${PREFIX}/doc/${PKGNAM}
+
+find ${PKG} | xargs file | egrep -e "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
+
+gzip -9 ${PKG}/${PREFIX}/man/man?/*.?
+
+cat ${CWD}/sdl.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/$(echo ${VERSION} | tr . ' ')/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
+
+
+# # Add SDL_mixer:
+# begin "SDL_mixer-$MIXER"
+#
+# # Fix default library path. Don't use /usr/local, and use lib64 where needed:
+# sed -i "s,usr/local/lib,usr/lib${LIBDIRSUFFIX},g" timidity/config.h
+#
+# # Install patched static libmikmod:
+# unzip libmikmod-3.1.12.zip
+# ( cd libmikmod-3.1.12.patched
+# ./configure \
+# --prefix=/${PREFIX}/local \
+# --libdir=/${PREFIX}/local/lib${LIBDIRSUFFIX} \
+# --with-pic \
+# --enable-shared=no \
+# --enable-static=yes
+# make $NUMJOBS || make || exit 1
+# make install
+# )
+#
+# chown -R root:root .
+# chmod -R u+w,go+r-w,a-s .
+#
+# CFLAGS="-O2" \
+# ./configure ${COMMON_CONFIGURE_OPTIONS} --enable-music-mod
+#
+# make_make_install
+# install_doc "SDL_mixer-$MIXER"
diff --git a/l/sdl/sdl.yypkg.script b/l/sdl/sdl.yypkg.script
new file mode 100644
index 0000000..27b4dd4
--- /dev/null
+++ b/l/sdl/sdl.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version ((%{VER}) Stable %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())
diff --git a/l/zlib/Makefile.yypkg b/l/zlib/Makefile.yypkg
new file mode 100644
index 0000000..b7eed2e
--- /dev/null
+++ b/l/zlib/Makefile.yypkg
@@ -0,0 +1,140 @@
+# Makefile for zlib, derived from Makefile.dj2.
+# Modified for mingw32 by C. Spieler, 6/16/98.
+# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
+# Last updated: 1-Aug-2003.
+# Tested under Cygwin and MinGW.
+# Modified for {i686,x86_64}-w64-mingw32 and cross-compilation by Adrien Nader,
+# Sun Jul 8 2012; partially based on a patch from Vincent Torri
+
+# Copyright (C) 1995-2003 Jean-loup Gailly.
+# For conditions of distribution and use, see copyright notice in zlib.h
+
+# To compile, or to compile and test, type:
+#
+# make -fmakefile.gcc; make test testdll -fmakefile.gcc
+#
+# To use the asm code, type:
+# cp contrib/asm?86/match.S ./match.S
+# make LOC=-DASMV OBJA=match.o -fmakefile.gcc
+#
+# To install libz.a, zconf.h and zlib.h in the system directories, type:
+#
+# make install -fmakefile.gcc
+
+# Note:
+# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN),
+# the DLL name should be changed from "zlib1.dll".
+
+STATICLIB = libz.a
+SHAREDLIB = libz-1.dll
+IMPLIB = libz.dll.a
+
+#LOC = -DASMV
+#LOC = -DDEBUG -g
+
+PREFIX ?=
+CC ?= $(PREFIX)gcc
+CFLAGS ?= $(LOC) -O3 -Wall
+EXTRA_CFLAGS = -DNO_VIZ
+
+AS ?= $(CC)
+ASFLAGS ?= $(LOC) -Wall
+
+LD ?= $(CC)
+LDFLAGS ?= $(LOC)
+
+AR ?= $(PREFIX)ar
+ARFLAGS ?= rcs
+
+RC ?= $(PREFIX)windres
+RCFLAGS ?= --define GCC_WINDRES
+
+STRIP ?= $(PREFIX)strip
+
+CP = cp -fp
+# If GNU install is available, replace $(CP) with install.
+INSTALL = $(CP)
+RM = rm -f
+
+prefix ?= /usr/local
+exec_prefix = $(prefix)
+
+OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \
+ gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o \
+ zutil.o
+OBJA =
+
+all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example.exe minigzip.exe example_d.exe minigzip_d.exe
+
+test: example.exe minigzip.exe
+ ./example
+ echo hello world | ./minigzip | ./minigzip -d
+
+testdll: example_d.exe minigzip_d.exe
+ ./example_d
+ echo hello world | ./minigzip_d | ./minigzip_d -d
+
+.c.o:
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+
+.S.o:
+ $(AS) $(ASFLAGS) -c -o $@ $<
+
+$(STATICLIB): $(OBJS) $(OBJA)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
+
+$(IMPLIB): $(SHAREDLIB)
+
+$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
+ $(CC) -shared -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \
+ -o $@ win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
+ $(STRIP) $@
+
+example.exe: example.o $(STATICLIB)
+ $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
+ $(STRIP) $@
+
+minigzip.exe: minigzip.o $(STATICLIB)
+ $(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB)
+ $(STRIP) $@
+
+example_d.exe: example.o $(IMPLIB)
+ $(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB)
+ $(STRIP) $@
+
+minigzip_d.exe: minigzip.o $(IMPLIB)
+ $(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB)
+ $(STRIP) $@
+
+example.o: test/example.c zlib.h zconf.h
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -I. -c -o $@ test/example.c
+
+minigzip.o: test/minigzip.c zlib.h zconf.h
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -I. -c -o $@ test/minigzip.c
+
+zlibrc.o: win32/zlib1.rc
+ $(RC) $(RCFLAGS) -o $@ win32/zlib1.rc
+
+clean:
+ -$(RM) $(STATICLIB)
+ -$(RM) $(SHAREDLIB)
+ -$(RM) $(IMPLIB)
+ -$(RM) *.o
+ -$(RM) *.exe
+ -$(RM) foo.gz
+
+adler32.o: zlib.h zconf.h
+compress.o: zlib.h zconf.h
+crc32.o: crc32.h zlib.h zconf.h
+deflate.o: deflate.h zutil.h zlib.h zconf.h
+gzclose.o: zlib.h zconf.h gzguts.h
+gzlib.o: zlib.h zconf.h gzguts.h
+gzread.o: zlib.h zconf.h gzguts.h
+gzwrite.o: zlib.h zconf.h gzguts.h
+inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
+inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
+infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
+inftrees.o: zutil.h zlib.h zconf.h inftrees.h
+trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
+uncompr.o: zlib.h zconf.h
+zutil.o: zutil.h zlib.h zconf.h
diff --git a/l/zlib/config-regular b/l/zlib/config-regular
new file mode 100644
index 0000000..4810991
--- /dev/null
+++ b/l/zlib/config-regular
@@ -0,0 +1,2 @@
+export SHARED="--shared"
+export TARGETS="libz-1.dll libz.dll.a example_d.exe minigzip_d.exe"
diff --git a/l/zlib/config-yypkg b/l/zlib/config-yypkg
new file mode 100644
index 0000000..801c8fb
--- /dev/null
+++ b/l/zlib/config-yypkg
@@ -0,0 +1,2 @@
+export SHARED="--static"
+export TARGETS="libz.a example.exe minigzip.exe"
diff --git a/l/zlib/zlib.SlackBuild b/l/zlib/zlib.SlackBuild
index eb28428..4eca589 100755
--- a/l/zlib/zlib.SlackBuild
+++ b/l/zlib/zlib.SlackBuild
@@ -39,23 +39,6 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-zlib
-if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
@@ -71,65 +54,66 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr
-make clean
-make || exit 1
-CFLAGS="$SLKCFLAGS" \
+# We only call configure so that it creates "zlib.pc" from "zlib.pc.in". zlib's
+# build system is pretty crappy and doesn't handle cross-compilation: we have to
+# call a makefile directly instead.
+CFLAGS="-O3" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --shared
-make || exit 1
-
-mkdir -p $PKG/usr/include
-cp -a zlib.h zconf.h $PKG/usr/include
-chmod 644 $PKG/usr/include/*
-mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
-cp -a libz.a libz.so* $PKG/usr/lib${LIBDIRSUFFIX}
-chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/*
-chmod 644 $PKG/usr/lib${LIBDIRSUFFIX}/libz.a
-mkdir -p $PKG/usr/man/man3
-cat zlib.3 | gzip -9c > $PKG/usr/man/man3/zlib.3.gz
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ ${SHARED}
+
+CC=${HOST_TRIPLET}-gcc \
+ CFLAGS="-O3 -Wall" \
+ LD=${HOST_TRIPLET}-gcc \
+ AS=${HOST_TRIPLET}-gcc \
+ AR="${HOST_TRIPLET}-ar" \
+ RC="${HOST_TRIPLET}-windres" \
+ STRIP="${HOST_STRIP}" \
+ make -j8 -f $CWD/Makefile.yypkg ${TARGETS} || exit 1
+
+FIND_1f="find . -maxdepth 1 -type f"
+mkdir -p $PKG/${PREFIX}/include
+cp -a zlib.h zconf.h $PKG/${PREFIX}/include
+chmod 644 $PKG/${PREFIX}/include/*
+
+mkdir -p $PKG/${PREFIX}/bin $PKG/${PREFIX}/lib${LIBDIRSUFFIX}
+${FIND_1f} -name 'libz*.dll' | \
+ xargs -I '{}' install -m 755 '{}' $PKG/${PREFIX}/bin
+${FIND_1f} -a \( -name 'libz*.dll.a' -o -name 'libz.a' \) | \
+ xargs -I '{}' install -m 755 '{}' $PKG/${PREFIX}/lib${LIBDIRSUFFIX}
+
+mkdir -p $PKG/${PREFIX}/man/man3
+cat zlib.3 | gzip -9c > $PKG/${PREFIX}/man/man3/zlib.3.gz
# Add pkgconfig file:
-mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
-cat zlib.pc > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/zlib.pc
-
-# Now that libkmod requires libz, we had better move the shared library
-# up a level:
-mkdir $PKG/lib${LIBDIRSUFFIX}
-( cd $PKG/usr/lib${LIBDIRSUFFIX}
- for file in lib*.so.?.* ; do
- mv $file ../../lib${LIBDIRSUFFIX}
- ln -sf ../../lib${LIBDIRSUFFIX}/$file .
- done
- cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
-)
+mkdir -p $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig
+cat zlib.pc > $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/zlib.pc
# Strip binaries:
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | egrep "executable|shared object" | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
)
-mkdir -p $PKG/usr/doc/zlib-$VERSION
+mkdir -p $PKG/${PREFIX}/doc/zlib-$VERSION
cp -a \
FAQ INDEX README* \
- $PKG/usr/doc/zlib-$VERSION
+ $PKG/${PREFIX}/doc/zlib-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ DOCSDIR=$(echo $PKG/${PREFIX}/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-makepkg -l y -c n $TMP/zlib-$VERSION-$ARCH-$BUILD.txz
+cat ${CWD}/${PKGNAM}.yypkg.script | sed \
+ -e "s/%{PKG}/${PKGNAM}/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/l/zlib/zlib.yypkg.script b/l/zlib/zlib.yypkg.script
new file mode 100644
index 0000000..96b5f52
--- /dev/null
+++ b/l/zlib/zlib.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())