mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
libwmf, new recipe (#6837)
This commit is contained in:
150
media-libs/libwmf/libwmf-0.2.12.recipe
Normal file
150
media-libs/libwmf/libwmf-0.2.12.recipe
Normal file
@@ -0,0 +1,150 @@
|
||||
SUMMARY="Library to convert wmf files"
|
||||
DESCRIPTION="A library for reading vector images in Microsoft's Windows Metafile Format (WMF)"
|
||||
HOMEPAGE="http://wvware.sourceforge.net/libwmf.html
|
||||
https://github.com/caolanm/libwmf"
|
||||
COPYRIGHT="2018-2021 Caolán McNamara
|
||||
2000-2001 Martin Vermeer
|
||||
2001 Francis James Franklin"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
srcGitRev="b175ff18b5d3a7cec1cf5c14b71c7e9c08076405"
|
||||
SOURCE_URI="https://github.com/caolanm/libwmf/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="4d734eadad4c85aa92880f5295acb1431a6864fa7a51c48d312988172cee69f4"
|
||||
SOURCE_FILENAME="libwmf-$portVersion-$srcGitRev.tar.gz"
|
||||
SOURCE_DIR="libwmf-$srcGitRev"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandBinDir=$binDir
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
libWMFVersion="7.1.4"
|
||||
libWMFVersionCompat="$libWMFVersion compat >= ${libWMFVersion%%.*}"
|
||||
libWMFLITEVersion="7.0.5"
|
||||
libWMFLITEVersionCompat="$libWMFLITEVersion compat >= ${libWMFLITEVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
libwmf$secondaryArchSuffix = $portVersion
|
||||
lib:libwmf_0.2$secondaryArchSuffix = $libWMFVersionCompat
|
||||
lib:libwmflite_0.2$secondaryArchSuffix = $libWMFLITEVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libexpat$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libgdk_pixbuf_2.0$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libwmf${secondaryArchSuffix}_devel = $portVersion
|
||||
cmd:libwmf_config$commandSuffix
|
||||
cmd:libwmf_fontmap$commandSuffix
|
||||
devel:libwmf$secondaryArchSuffix
|
||||
devel:libwmf_0.2$secondaryArchSuffix = $libWMFVersionCompat
|
||||
devel:libwmflite$secondaryArchSuffix
|
||||
devel:libwmflite_0.2$secondaryArchSuffix = $libWMFLITEVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libwmf$secondaryArchSuffix == $portVersion base
|
||||
devel:libbrotlidec$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libgraphite2$secondaryArchSuffix
|
||||
devel:libharfbuzz$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_tools="
|
||||
libwmf${secondaryArchSuffix}_tools = $portVersion
|
||||
cmd:wmf2eps$commandSuffix
|
||||
cmd:wmf2fig$commandSuffix
|
||||
cmd:wmf2gd$secondaryArcommandSuffixchSuffix
|
||||
cmd:wmf2svg$commandSuffix
|
||||
"
|
||||
REQUIRES_tools="
|
||||
libwmf$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libexpat$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libexpat$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libgdk_pixbuf_2.0$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoreconf
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
defineDebugInfoPackage libwmf$secondaryArchSuffix \
|
||||
$libDir/libwmf-0.2.so.$libWMFVersion \
|
||||
$libDir/libwmflite-0.2.so.$libWMFLITEVersion \
|
||||
"$(getPackagePrefix tools)"/bin/wmf2eps \
|
||||
"$(getPackagePrefix tools)"/bin/wmf2fig \
|
||||
"$(getPackagePrefix tools)"/bin/wmf2gd \
|
||||
"$(getPackagePrefix tools)"/bin/wmf2svg
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# TODO, check on wether these fonts are needed or not,
|
||||
# URW fonts installs *.otf fonts in $fontsDir/otfonts
|
||||
# the ones here are *.t1 and *.afm which are simular to
|
||||
# the ones in $fontsDir/psfonts/*.afm
|
||||
# None of them provide a "fontmap"
|
||||
|
||||
autoreconf -fi
|
||||
runConfigure --omit-dirs binDir ./configure \
|
||||
--bindir=$commandBinDir \
|
||||
--with-docdir=$docDir \
|
||||
--with-fontdir=$dataDir/libwmf/fonts \
|
||||
--with-xtrafontmap=$dataDir/libwmf/fonts/fontmap
|
||||
# --with-gsfontdir=$fontsDir/otfonts\
|
||||
# --with-gsfontmap=$dataDir/ghostscript/9.55.0/lib/Fontmap.GS
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
find "$libDir" -name '*.la' -delete
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libwmf libwmf-0.2 libwmflite libwmflite-0.2
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$commandBinDir/{libwmf-config,libwmf-fontmap}
|
||||
|
||||
packageEntries tools \
|
||||
$commandBinDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
# nothing to do
|
||||
make check
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
diff -urN libwmf-0.2.8.4/configure.ac libwmf-0.2.8.4-haiku/configure.ac
|
||||
--- libwmf-0.2.8.4/configure.ac 2009-03-07 01:58:56.000000000 +0000
|
||||
+++ libwmf-0.2.8.4-haiku/configure.ac 2009-03-07 02:18:00.000000000 +0000
|
||||
@@ -124,6 +124,9 @@
|
||||
os_win32=yes
|
||||
SYS_LIBM=""
|
||||
;;
|
||||
+ *haiku*|*beos*)
|
||||
+ SYS_LIBM=""
|
||||
+ ;;
|
||||
*)
|
||||
os_win32=no
|
||||
SYS_LIBM="-lm"
|
||||
@@ -528,7 +531,7 @@
|
||||
WMF_PNG_LDFLAGS="-lpng"
|
||||
fi
|
||||
],[ AC_MSG_ERROR(* * * unable to find libpng which is required by libwmf * * *)
|
||||
- ],-lz -lm)
|
||||
+ ],-lz $SYS_LIBM)
|
||||
],[ AC_MSG_ERROR(* * * unable to find "png.h" which is required by libwmf * * *)
|
||||
])
|
||||
|
||||
@@ -645,7 +648,7 @@
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $WMF_FT_CFLAGS $WMF_PNG_CFLAGS $WMF_Z_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $WMF_FT_LDFLAGS $WMF_PNG_LDFLAGS $WMF_Z_LDFLAGS"
|
||||
- other_libs="$other_libs -lfreetype -lpng -lz -lm"
|
||||
+ other_libs="$other_libs -lfreetype -lpng -lz $SYS_LIBM"
|
||||
|
||||
AC_CHECK_HEADER(gd.h,[
|
||||
AC_CHECK_LIB(gd,gdClipSetAdd,[
|
||||
diff -urN libwmf-0.2.8.4/configure.in libwmf-0.2.8.4-haiku/configure.in
|
||||
--- libwmf-0.2.8.4/configure.in 2009-03-07 01:58:56.000000000 +0000
|
||||
+++ libwmf-0.2.8.4-haiku/configure.in 2009-03-07 01:49:01.000000000 +0000
|
||||
@@ -123,6 +123,9 @@
|
||||
os_win32=yes
|
||||
SYS_LIBM=""
|
||||
;;
|
||||
+ haiku*|beos*)
|
||||
+ SYS_LIBM=""
|
||||
+ ;;
|
||||
*)
|
||||
os_win32=no
|
||||
SYS_LIBM="-lm"
|
||||
Reference in New Issue
Block a user