diff --git a/app-office/lyx/lyx-2.1.3.recipe b/app-office/lyx/lyx-2.1.3.recipe new file mode 100644 index 000000000..938686cd1 --- /dev/null +++ b/app-office/lyx/lyx-2.1.3.recipe @@ -0,0 +1,87 @@ +SUMMARY="A document processor that encourages an approach to writing based \ +on the structure of your documents and not simply their appearance." +DESCRIPTION="LyX combines the power and flexibility of TeX/LaTeX with the ease \ +of use of a graphical interface. This results in world-class support for creation \ +of mathematical content (via a fully integrated equation editor) and structured \ +documents like academic articles, theses, and books. In addition, staples of \ +scientific authoring such as reference list and index creation come standard. But \ +you can also use LyX to create a letter or a novel or a theatre play or film \ +script. A broad array of ready, well-designed document layouts are built in.\ +\ +LyX is for people who want their writing to look great, right out of the box. No \ +more endless tinkering with formatting details, \"finger painting\" font \ +attributes or futzing around with page boundaries. You just write. On screen, LyX \ +looks like any word processor; its printed output - or richly cross-referenced \ +PDF, just as readily produced - looks like nothing else." +HOMEPAGE="http://www.lyx.org" +REVISION="1" +LICENSE="GNU GPL v2" +COPYRIGHT="Copyright the lyx community" +ARCHITECTURES="x86_gcc2 x86" +SECONDARY_ARCHITECTURES="x86" + +SRC_URI="ftp://ftp.lyx.org/pub/lyx/stable/2.1.x/lyx-2.1.3.tar.gz" +CHECKSUM_SHA256="51614a22df749f256aebf768b2066984f1185c1190ce5f7a1b6f9e9bf181846f" + +PATCHES=" + lyx.patchset + icon.patch" + +PROVIDES=" + lyx = $portVersion + app:LyX + cmd:lyxclient${secondaryArchSuffix} + cmd:tex2lyx${secondaryArchSuffix} +" + +REQUIRES=" + haiku${secondaryArchSuffix} + libqt4${secondaryArchSuffix} + lib:libboost_regex${secondaryArchSuffix} + lib:libboost_signals${secondaryArchSuffix} + lib:libstdc++${secondaryArchSuffix} + lib:libz${secondaryArchSuffix} + lib:libiconv${secondaryArchSuffix} +" + +# TODO: add support for hunspell +BUILD_REQUIRES=" + boost${secondaryArchSuffix}_devel + libqt4${secondaryArchSuffix}_devel + devel:libz${secondaryArchSuffix} + devel:libiconv${secondaryArchSuffix} +" + +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel + cmd:gcc${secondaryArchSuffix} + cmd:make + cmd:ld${secondaryArchSuffix} + cmd:autoconf + cmd:automake + cmd:gettext${secondaryArchSuffix} + cmd:find + cmd:pkg_config${secondaryArchSuffix} +" + +BUILD() +{ + ./autogen.sh + # pkg-config data for libqt4_devel is broken + # we also can't use runConfigure, as environment variables don't + # get passed along correctly + ./configure --without-included-boost --prefix=$prefix --bindir=$binDir \ + --docdir=$docDir --datadir=$dataDir --datarootdir=$dataRootDir \ + QT4_CORE_CFLAGS=-I/boot/system/develop/headers/x86/QtCore \ + QT4_FRONTEND_CFLAGS='-I/boot/system/develop/headers/x86/QtCore -I/boot/system/develop/headers/x86/QtGui' + make V=1 $jobArgs +} + +INSTALL() +{ + make install + addattr -f lib/images/lyx.hvif -t \'VICN\' BEOS:ICON $binDir/lyx + mkdir $appsDir + mv $binDir/lyx $appsDir/LyX + addAppDeskbarSymlink $appsDir/LyX LyX +} diff --git a/app-office/lyx/patches/icon.patch b/app-office/lyx/patches/icon.patch new file mode 100644 index 000000000..7a8b15ce3 --- /dev/null +++ b/app-office/lyx/patches/icon.patch @@ -0,0 +1,27 @@ +From 91a1aa98aea441581408e0f6429720aa114e1bed Mon Sep 17 00:00:00 2001 +From: Jessica Hamilton +Date: Fri, 5 Jun 2015 17:56:20 +1200 +Subject: [PATCH] Haiku vector icon file (from SVG) + +--- + lib/images/lyx.hvif | Bin 0 -> 312 bytes + 1 file changed, 0 insertions(+), 0 deletions(-) + create mode 100644 lib/images/lyx.hvif + +diff --git a/lib/images/lyx.hvif b/lib/images/lyx.hvif +new file mode 100644 +index 0000000000000000000000000000000000000000..9ec61291c8e30cd7bda2708fdf638a8184ea0e3a +GIT binary patch +literal 312 +zcmc~x&P-!tW~l$q%n-SW`Lr7 +zj?Ulz^$6=B`-2(>a}K}T8_Y$z4$fV7chBCJxkqe&`99ABr}rcsiQRMKp!mV&171ge +z?fG%EcyHIiA}*p-v2iglGB9v4GBOGo<6GDEp6j4TXXtcE&y@Q +Bn=b$W + +literal 0 +HcmV?d00001 + +-- +2.2.2 + diff --git a/app-office/lyx/patches/lyx.patchset b/app-office/lyx/patches/lyx.patchset new file mode 100644 index 000000000..3e88ce17f --- /dev/null +++ b/app-office/lyx/patches/lyx.patchset @@ -0,0 +1,76 @@ +From e719aa8ed98a9fdef1d2ee3beeec2d748a96b7ab Mon Sep 17 00:00:00 2001 +From: Jessica Hamilton +Date: Fri, 5 Jun 2015 14:44:12 +1200 +Subject: Qt4: Prevent crash on Haiku when clicking in a document + + +diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp +index 024c680..e3369b3 100644 +--- a/src/frontends/qt4/GuiWorkArea.cpp ++++ b/src/frontends/qt4/GuiWorkArea.cpp +@@ -798,7 +798,7 @@ void GuiWorkArea::mousePressEvent(QMouseEvent * e) + return; + } + +-#if (QT_VERSION < 0x050000) ++#if (QT_VERSION < 0x050000) && !defined(__HAIKU__) + inputContext()->reset(); + #endif + +-- +2.2.2 + + +From ee4014ed1fa9107aaf859152672e53a1d4f8aed6 Mon Sep 17 00:00:00 2001 +From: Jessica Hamilton +Date: Fri, 5 Jun 2015 14:49:00 +1200 +Subject: configure: also search for sockets in libnetwork + + +diff --git a/configure.ac b/configure.ac +index 8a8326b..935baa1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -188,8 +188,8 @@ save_LIBS="$LIBS" + LIBS= + AC_CHECK_FUNCS(fcntl, + [AC_SEARCH_LIBS([gethostbyname], [nsl]) +- AC_SEARCH_LIBS([socket], [socket], [], +- [AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"], ++ AC_SEARCH_LIBS([socket], [socket network], [], ++ [AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl -lnetwork $LIBS"], + [], [-lnsl])])], + [lyx_client_subdir=false]) + AC_SUBST(SOCKET_LIBS,$LIBS) +-- +2.2.2 + + +From 77f718b5259891b8509247981ebcc3e505262dff Mon Sep 17 00:00:00 2001 +From: Jessica Hamilton +Date: Fri, 5 Jun 2015 15:13:06 +1200 +Subject: autotools: search for libm when using system boost libraries + + +diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 +index 61ea48d..b8e41ed 100644 +--- a/config/lyxinclude.m4 ++++ b/config/lyxinclude.m4 +@@ -313,11 +313,12 @@ AC_DEFUN([LYX_USE_INCLUDED_BOOST],[ + AC_MSG_RESULT([$lyx_cv_with_included_boost]) + if test x$lyx_cv_with_included_boost != xyes ; then + AC_LANG_PUSH(C++) ++ AC_SEARCH_LIBS(cos, [m]) + save_LIBS=$LIBS + +- LIBS="$save_LIBS -lboost_signals -lm" ++ LIBS="$save_LIBS -lboost_signals" + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [boost::signal s;])], [lyx_boost_plain=yes], []) +- LIBS="$save_LIBS -lboost_signals-mt -lm $LIBTHREAD" ++ LIBS="$save_LIBS -lboost_signals-mt $LIBTHREAD" + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [boost::signal s;])], [lyx_boost_mt=yes], []) + + LIBS=$save_LIBS +-- +2.2.2 +