popt: converted to an actual recipe

This commit is contained in:
Jerome Duval
2014-06-11 20:49:10 +00:00
parent 6e05d6bcd6
commit de91d09573
2 changed files with 103 additions and 15 deletions

View File

@@ -0,0 +1,43 @@
From 4db73bb22181c9c029fecdd52eb0e73b0e638ef6 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 11 Jun 2014 16:57:20 +0000
Subject: haiku patch
diff --git a/configure.ac b/configure.ac
index 22f8bfc..0972545 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,6 @@ AC_GCC_TRADITIONAL
AC_SYS_LARGEFILE
AC_ISC_POSIX
-AM_C_PROTOTYPES
AC_CHECK_HEADERS(float.h fnmatch.h glob.h langinfo.h libintl.h mcheck.h unistd.h)
diff --git a/testit.sh b/testit.sh
index 2a7b4aa..2779f7c 100755
--- a/testit.sh
+++ b/testit.sh
@@ -115,7 +115,7 @@ run test1 "test1 - 56" "arg1: 0 arg2: (none) aFlag: 0xface" --nobitclr
run test1 "test1 - 57" "arg1: 0 arg2: (none) aBits: foo,baz" --bits foo,bar,baz,!bar
run test1 "test1 - 58" "\
-Usage: lt-test1 [-I?] [-c|--cb2=STRING] [--arg1] [-2|--arg2=ARG]
+Usage: test1 [-I?] [-c|--cb2=STRING] [--arg1] [-2|--arg2=ARG]
[-3|--arg3=ANARG] [-onedash] [--optional=STRING] [--val]
[-i|--int=INT] [-s|--short=SHORT] [-l|--long=LONG]
[-L|--longlong=LONGLONG] [-f|--float=FLOAT] [-d|--double=DOUBLE]
@@ -124,7 +124,7 @@ Usage: lt-test1 [-I?] [-c|--cb2=STRING] [--arg1] [-2|--arg2=ARG]
[--bitxor] [--nstr=STRING] [--lstr=STRING] [-I|--inc]
[-c|--cb=STRING] [--longopt] [-?|--help] [--usage] [--simple=ARG]" --usage
run test1 "test1 - 59" "\
-Usage: lt-test1 [OPTION...]
+Usage: test1 [OPTION...]
--arg1 First argument with a really long
description. After all, we have to test
argument help wrapping somehow, right?
--
1.8.3.4

View File

@@ -1,27 +1,72 @@
DESCRIPTION="popt"
HOMEPAGE="http://rpm5.org/files/popt/"
SUMMARY="A command line option parsing library"
DESCRIPTION="
This is the popt(3) command line option parsing library. While it is similiar \
to getopt(3), it contains a number of enhancements, including:
1) popt is fully reentrant
2) popt can parse arbitrary argv[] style arrays while \
getopt(3) makes this quite difficult
3) popt allows users to alias command line arguments
4) popt provides convience functions for parsing strings \
into argv[] style arrays
"
LICENSE="MIT"
COPYRIGHT="1998-2002 Red Hat, Inc."
HOMEPAGE="http://rpm5.org/files/popt/"
SRC_URI="http://rpm5.org/files/popt/popt-1.16.tar.gz"
CHECKSUM_SHA256="e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
CHECKSUM_MD5="3743beefa3dd6247a73f8f7a32c14c33"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86 x86_gcc2"
PATCHES="popt-1.16.patchset"
PROVIDES="
popt$secondaryArchSuffix = $portVersion
lib:libpopt$secondaryArchSuffix = 0.0.0 compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
"
BUILD_PREREQUIRES="
cmd:libtoolize
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:sed
"
BUILD()
{
cd popt-1.16
libtoolize --force --copy --install
echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.ac
aclocal -I m4
libtoolize -fci
autoconf
automake
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
cd popt-1.16
make install
prepareInstalledDevelLibs libpopt
fixPkgconfig
# devel package
packageEntries devel \
$developDir \
$manDir/man3
}
LICENSE="MIT"
COPYRIGHT="1998-2002 Red Hat, Inc."
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
popt${secondaryArchSuffix}_devel = $portVersion
devel:libpopt$secondaryArchSuffix = 0.0.0 compat >= 0
"
REQUIRES_devel="
popt$secondaryArchSuffix == $portVersion base
"