diff --git a/app-text/libmwaw/libmwaw-0.3.1.recipe b/app-text/libmwaw/libmwaw-0.3.1.recipe new file mode 100644 index 000000000..2b6444551 --- /dev/null +++ b/app-text/libmwaw/libmwaw-0.3.1.recipe @@ -0,0 +1,96 @@ +SUMMARY="A library for import of many legacy Mac document formats" +DESCRIPTION=" +libmwaw is a new project for converting many pre-OSX MAC text formats, some \ +graphic formats and some spreadsheet formats. +" +HOMEPAGE="http://sourceforge.net/projects/libmwaw/" +SRC_URI="http://prdownloads.sourceforge.net/libmwaw/libmwaw-$portVersion.tar.bz2" +LICENSE=" +MPL v2.0 +GNU LGPL v2.1 +" +COPYRIGHT=" +Fridrich Strba +Laurent Alonso +David Tardon +" +REVISION="1" +CHECKSUM_SHA256="66d3dbc4421daa628326204b5d14bb99f2b9d4423184027aabe207d677c89845" + +ARCHITECTURES="x86 ?x86_64" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + # x86_gcc2 is fine as primary target architecture as long as we're building + # for a different secondary architecture. + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + libmwaw$secondaryArchSuffix = $portVersion + cmd:mwaw2csv$secondaryArchSuffix + cmd:mwaw2html$secondaryArchSuffix + cmd:mwaw2raw$secondaryArchSuffix + cmd:mwaw2svg$secondaryArchSuffix + cmd:mwaw2text$secondaryArchSuffix + cmd:mwawFile$secondaryArchSuffix + cmd:mwawZip$secondaryArchSuffix + lib:libmwaw_0.3$secondaryArchSuffix = 3.0.1 compat >= 3 + " +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libboost_system$secondaryArchSuffix + lib:librevenge_0.0$secondaryArchSuffix + lib:librevenge_generators_0.0$secondaryArchSuffix + lib:librevenge_stream_0.0$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " +BUILD_REQUIRES=" + devel:libboost_system$secondaryArchSuffix + devel:librevenge_0.0$secondaryArchSuffix + devel:librevenge_generators_0.0$secondaryArchSuffix + devel:librevenge_stream_0.0$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:aclocal + cmd:libtoolize + cmd:autoconf + cmd:automake + cmd:autoheader + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +PATCHES="libmwaw-$portVersion.patchset" + +BUILD() +{ + libtoolize --force --copy --install + aclocal + autoheader + automake -a -c --foreign + autoconf + runConfigure ./configure --disable-werror + make $jobArgs +} + +INSTALL() +{ + make install + + prepareInstalledDevelLibs libmwaw-0.3 + fixPkgconfig + + packageEntries devel $developDir +} + +PROVIDES_devel=" + libmwaw${secondaryArchSuffix}_devel = $portVersion + devel:libmwaw_0.3$secondaryArchSuffix = 3.0.1 compat >= 3 + " +REQUIRES_devel=" + libmwaw$secondaryArchSuffix == $portVersion base + " diff --git a/app-text/libmwaw/patches/libmwaw-0.3.1.patchset b/app-text/libmwaw/patches/libmwaw-0.3.1.patchset new file mode 100644 index 000000000..9fed74e93 --- /dev/null +++ b/app-text/libmwaw/patches/libmwaw-0.3.1.patchset @@ -0,0 +1,65 @@ +From c6139ee764b898c8a90e898bb9fb94b89d854571 Mon Sep 17 00:00:00 2001 +From: Kacper Kasper +Date: Mon, 21 Jul 2014 17:18:22 +0200 +Subject: Haiku support + + +diff --git a/configure.ac b/configure.ac +index 12e7614..e318411 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -304,6 +304,7 @@ AC_COMPILE_IFELSE([ + ], [ + AC_MSG_RESULT([yes, find Darwin getxattr]) + [XATTR_CFLAGS="-DWITH_EXTENDED_FS=1"] ++ [XATTR_LIBS=""] + ], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( +@@ -314,12 +315,15 @@ AC_COMPILE_IFELSE([ + ], [ + AC_MSG_RESULT([yes, find Linux getxattr]) + [XATTR_CFLAGS="-DWITH_EXTENDED_FS=2"] ++ AS_CASE([$host], [*-*-haiku*], [XATTR_LIBS="-lgnu"], [XATTR_LIBS=""]) + ], [ + AC_MSG_RESULT([no]) + [XATTR_CFLAGS="-DWITH_EXTENDED_FS=0"] ++ [XATTR_LIBS=""] + ]) + ]) + AC_SUBST(XATTR_CFLAGS) ++AC_SUBST(XATTR_LIBS) + + # ========= + # Find zlib +diff --git a/src/tools/file/Makefile.am b/src/tools/file/Makefile.am +index 9b25e89..6260426 100644 +--- a/src/tools/file/Makefile.am ++++ b/src/tools/file/Makefile.am +@@ -3,7 +3,7 @@ bin_PROGRAMS = mwawFile + AM_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/lib/ $(REVENGE_CFLAGS) $(XATTR_CFLAGS) $(DEBUG_CXXFLAGS) + + mwawFile_DEPENDENCIES = @MWAWFILE_WIN32_RESOURCE@ +-mwawFile_LDADD = @MWAWFILE_WIN32_RESOURCE@ ++mwawFile_LDADD = $(XATTR_LIBS) @MWAWFILE_WIN32_RESOURCE@ + + if STATIC_TOOLS + mwawFile_LDFLAGS = -all-static +diff --git a/src/tools/zip/Makefile.am b/src/tools/zip/Makefile.am +old mode 100755 +new mode 100644 +index a8dd26d..28a9c51 +--- a/src/tools/zip/Makefile.am ++++ b/src/tools/zip/Makefile.am +@@ -3,7 +3,7 @@ bin_PROGRAMS = mwawZip + AM_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/lib/ $(REVENGE_CFLAGS) $(XATTR_CFLAGS) $(ZLIB_CFLAGS) $(DEBUG_CXXFLAGS) + + mwawZip_DEPENDENCIES = @MWAWZIP_WIN32_RESOURCE@ +-mwawZip_LDADD = $(ZLIB_LIBS) @MWAWZIP_WIN32_RESOURCE@ ++mwawZip_LDADD = $(XATTR_LIBS) $(ZLIB_LIBS) @MWAWZIP_WIN32_RESOURCE@ + + if STATIC_TOOLS + mwawZip_LDFLAGS = -all-static +-- +1.8.3.4 +