PATCH_LIST= FILE_LIST= SRC_FETCH_METHOD=http # retrieval method : # can be svn, git, http, ftp, filesystem # SRC_FETCH_METHOD=http # SRC_FETCH_PATH=https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-${PKGVER}.tar.bz2 # Use FLXHOSTOS, FLXHOSTARCH, HOSTCC, HOSTCXX for the machine used to build. # Use FLXTARGOS, FLXTARGARCH, CC, CXX, LD, for the target machine. # FLXMAKE usually is 'make', FLXPMAKE usually is 'make -j 2' # Build tools are in /$FLXTOOLDIR, toolchain root dir is /$FLXROOTDIR. # Current dir is /$CURDIR, package dir is /$PKGDIR, dest root dir is /$ROOTDIR. # Package name is $PKGRADIX-$PKGVER-$DISTVER # optimize for size #FLXARCH=$FLX_ARCH_SMALL MAKEDEPENDS= # format : # MAKEDEPENDS='packagename:versfx:architecture:globbing' # # exemple : # MAKEDEPENDS='tplparser-0local-flx0.0:albdev:i586:*.a *.h' function do_config { # Sometimes, broken packages will need LD="$CC" CC="$CC" CXX="$CXX" LD="$LD" \ RANLIB="$RANLIB" AR="$AR" AS="$AS" NM="$NM" OBJDUMP="$OBJDUMP" \ CFLAGS="$GCC_ARCH_SMALL $GCC_CPU_SMALL $GCC_OPT_SMALL -fPIC" \ CPPFLAGS="-I$FLXROOTDIR/opt/db4/include" \ LDFLAGS="-I$FLXROOTDIR/opt/db4/lib -fPIC" \ ./configure \ --build=${FLXHOST} --host=${FLXTARG} \ --prefix=/usr --sysconfdir=/etc --enable-static=yes --disable-nls } function do_compile_only { # we need to add a typedef struct gpgrt_lock_t in gpg-error.h otherwise it won't compile. # this is normally done by mkheader script, but it doesn't recognize out host triple (ie x86_64-flx-linux-gnu) # so we do it by hand # replace the vendor in the host triplet with 'unknown' (in formilux we have 'flx') # Some targets are not recognized so they're better mapped explicitly. Have # a look inside src/syscfg/ to list existing ones. case "$FLXTARG" in armv*) standard_host_triplet=arm-unknown-linux-gnueabi ;; *) standard_host_triplet=$(sed 's/^\([^-]*\)-[^-]*-\(.*\)/\1-unknown-\2/' <<<${FLXTARG}) ;; esac cd src rm -f gpg-error.h && $FLXMAKE gpg-error.h grep -v ^## syscfg/lock-obj-pub.${standard_host_triplet}.h > gpg-error.h2 cat gpg-error.h >> gpg-error.h2 mv -f gpg-error.h2 gpg-error.h cd .. # parallel make $FLXPMAKE } function do_prepack { $FLXMAKE install DESTDIR=$ROOTDIR set_default_perm $ROOTDIR }