dialog: enable shared library and secondary arch.

This commit is contained in:
Jérôme Duval
2016-12-05 21:13:19 +01:00
parent a2e48f8654
commit ca77216c1c
2 changed files with 77 additions and 10 deletions

View File

@@ -9,33 +9,70 @@ LICENSE="GNU LGPL v2"
SOURCE_URI="ftp://invisible-island.net/dialog/dialog-${portVersion/_/-}.tgz"
CHECKSUM_SHA256="453095abaec288bfbc1ca9faced917e17742cff1ea45ec46210071ac153562f9"
SOURCE_DIR="dialog-${portVersion/_/-}"
REVISION="1"
REVISION="2"
PATCHES="dialog-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
dialog = $portVersion
dialog$secondaryArchSuffix = $portVersion
lib:libdialog$secondaryArchSuffix = 13.0.0 compat >= 13
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:dialog = $portVersion
"
fi
REQUIRES="
haiku
lib:libncurses
haiku$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
"
PROVIDES_devel="
dialog${secondaryArchSuffix}_devel = $portVersion
cmd:dialog_config$secondaryArchSuffix = $portVersion
devel:libdialog$secondaryArchSuffix = 13.0.0 compat >= 13
"
REQUIRES_devel="
dialog$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku_devel
devel:libncurses
haiku${secondaryArchSuffix}_devel
devel:libncurses$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc
cmd:ld
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
./configure --bindir=$binDir
runConfigure --omit-dirs "docDir" ./configure --with-shared \
--with-ncursesw --with-libtool
make
}
INSTALL()
{
make install
make install-full
rm $libDir/libdialog.la
prepareInstalledDevelLib libdialog
# devel package
packageEntries devel \
$binDir/dialog-config \
$developDir \
$manDir/man3
# Remove stuff we don't need in the secondary architecture base package.
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $binDir $manDir
fi
}

View File

@@ -0,0 +1,30 @@
From 6f41b97ceedbc7a5125cc8fb0ecd29995f47e765 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 5 Dec 2016 16:56:34 +0000
Subject: add a case for haiku.
diff --git a/configure b/configure
index a82b478..bb8cd58 100755
--- a/configure
+++ b/configure
@@ -10367,6 +10367,16 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
(beos*)
MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
;;
+ (haiku*)
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_cv_shared_soname='`basename $@`'
+ fi
+
+ MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -shared -Xlinker -soname='$cf_cv_shared_soname
+ ;;
(cygwin*)
CC_SHARED_OPTS=
MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
--
2.10.2