discount: updated recipe to 2.2.1 (#818)

* discount: updated recipe to 2.2.1

* discount: small (or cosmetic) fixes.

* SECONDARY_ARCHITECTURES: add declaration with "x86_gcc2 x86". While
  at it, swap x86_gcc2 and x86 in ARCHITECTURES as most recipes use
  that order.
* PROVIDES: only enable cmd: items if building for a primary arch.
* REQUIRES_devel: add "base" keyword.
* BUILD_PREREQUIRES: remove cmd:g++, add cmd:{awk,find}, sort entries.
* BUILD: Fix indentation and pass --shared instead of --enable-shared.
  Also move man3 to the _devel sub-package.
* TEST: Add function with "make test".
This commit is contained in:
Calvin Hill
2016-10-21 22:40:23 +01:00
committed by waddlesplash
parent d9e15c117d
commit c6fd0f0341
2 changed files with 93 additions and 68 deletions

View File

@@ -1,68 +0,0 @@
SUMMARY="An implementation of John Gruber's Markdown text to html language"
DESCRIPTION="Markdown provides a library that gives you formatting functions \
suitable for marking down entire documents or lines of text, a command-line \
program that you can use to mark down documents interactively or from a \
script, and a tiny (3 programs so far) suite of example programs that show \
how to fully utilize the markdown library."
HOMEPAGE="http://www.pell.portland.or.us/~orc/Code/discount/"
COPYRIGHT="2007-2012 David Loren Parsons"
LICENSE="BSD (4-clause)"
REVISION="1"
SOURCE_URI="http://www.pell.portland.or.us/~orc/Code/discount/discount-2.1.3.tar.bz2"
CHECKSUM_SHA256="7280da7a27be42244311912eeee19695623f196817ec08f43b652fcc2ded975d"
ARCHITECTURES="x86 x86_gcc2"
PROVIDES="
discount = $portVersion compat >= 2
cmd:markdown = $portVersion compat >= 2
cmd:makepage = $portVersion compat >= 2
cmd:mkd2html = $portVersion compat >= 2
cmd:theme = $portVersion compat >= 2
"
REQUIRES="
haiku
"
PROVIDES_devel="
discount_devel = $portVersion compat >= 2
devel:libmarkdown
"
REQUIRES_devel="
discount == $portVersion
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:gcc
cmd:g++
cmd:ld
cmd:ar
cmd:ranlib
cmd:sed
cmd:find
"
BUILD()
{
./configure.sh --prefix=$prefix \
--execdir=$binDir \
--sbindir=$sbinDir \
--confdir=$settingsDir \
--libdir=$libDir \
--libexecdir=$libExecDir \
--mandir=$manDir \
--enable-all-features \
--enable-shared
make INCDIR=$includeDir
}
INSTALL()
{
make install.everything INCDIR=$includeDir
prepareInstalledDevelLibs libmarkdown
packageEntries devel $developDir
}

View File

@@ -0,0 +1,93 @@
SUMMARY="An implementation of John Gruber's Markdown text to html language"
DESCRIPTION="Markdown provides a library that gives you formatting functions \
suitable for marking down entire documents or lines of text, a command-line \
program that you can use to mark down documents interactively or from a \
script, and a tiny (3 programs so far) suite of example programs that show \
how to fully utilize the markdown library."
HOMEPAGE="http://www.pell.portland.or.us/~orc/Code/discount/"
COPYRIGHT="2007-2016 David Loren Parsons"
LICENSE="BSD (4-clause)"
REVISION="1"
SOURCE_URI="http://www.pell.portland.or.us/~orc/Code/discount/discount-$portVersion.tar.bz2"
CHECKSUM_SHA256="88458c7c2cfc870f8e6cf42b300408c112e05a45c88f8af35abb33de0e96fe0e"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
discount$secondaryArchSuffix = $portVersion compat >= 2
lib:libmarkdown$secondaryArchSuffix = $portVersion compat >= 2
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:markdown$secondaryArchSuffix = $portVersion compat >= 2
cmd:makepage$secondaryArchSuffix = $portVersion compat >= 2
cmd:mkd2html$secondaryArchSuffix = $portVersion compat >= 2
cmd:theme$secondaryArchSuffix = $portVersion compat >= 2
"
fi
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
discount${secondaryArchSuffix}_devel = $portVersion compat >= 2
devel:libmarkdown$secondaryArchSuffix = $portVersion compat >= 2
"
REQUIRES_devel="
discount$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:ar$secondaryArchSuffix
cmd:awk
cmd:diff
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:ranlib$secondaryArchSuffix
cmd:sed
"
BUILD()
{
./configure.sh --prefix=$prefix \
--execdir=$binDir \
--sbindir=$sbinDir \
--confdir=$settingsDir \
--libdir=$libDir \
--libexecdir=$libExecDir \
--mandir=$manDir \
--shared
make INCDIR=$includeDir
}
INSTALL()
{
make install.everything INCDIR=$includeDir
prepareInstalledDevelLib libmarkdown
fixPkgconfig
if [ -z "$secondaryArchSuffix" ]; then
maybe_manDir_man3=$manDir/man3
else
maybe_manDir_man3=
rm -rf $binDir
rm -rf $documentationDir
fi
packageEntries devel \
$developDir \
$maybe_manDir_man3
}
TEST()
{
make test
}