summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/Makefile1
-rw-r--r--editors/libreoffice-legacy/Makefile390
-rw-r--r--editors/libreoffice-legacy/distinfo106
-rw-r--r--editors/libreoffice-legacy/files/patch-bin__build-ooo11
-rw-r--r--editors/libreoffice-legacy/files/patch-bin__ooinstall11
-rw-r--r--editors/libreoffice-legacy/files/patch-build__libreoffice____desktop__scripts__unopkg.sh11
-rw-r--r--editors/libreoffice-legacy/files/patch-build__libreoffice__configure.in11
-rw-r--r--editors/libreoffice-legacy/files/patch-build__libreoffice__oox__util__makefile.mk10
-rw-r--r--editors/libreoffice-legacy/files/patch-build__libreoffice__padmin__source__spadmin.sh17
-rw-r--r--editors/libreoffice-legacy/files/patch-build__libreoffice__scripts__soffice.sh11
-rw-r--r--editors/libreoffice-legacy/files/patch-build__libreoffice__solenv__bin__ooinstall11
-rw-r--r--editors/libreoffice-legacy/pkg-descr6
12 files changed, 596 insertions, 0 deletions
diff --git a/editors/Makefile b/editors/Makefile
index 4a56bb0975b0..b8969075b2ba 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -162,6 +162,7 @@
SUBDIR += leo
SUBDIR += lfhex
SUBDIR += libreoffice
+ SUBDIR += libreoffice-legacy
SUBDIR += madedit
SUBDIR += manedit
SUBDIR += mg
diff --git a/editors/libreoffice-legacy/Makefile b/editors/libreoffice-legacy/Makefile
new file mode 100644
index 000000000000..c9b0f7bd56df
--- /dev/null
+++ b/editors/libreoffice-legacy/Makefile
@@ -0,0 +1,390 @@
+# New ports collection makefile for: libreoffice
+# Date created: 2010-12-06
+# Whom: Bapt <bapt@FreeBSD.Org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= libreoffice
+PORTVERSION= 3.3.3
+PORTREVISION= 2
+LOVERSION= ${PORTVERSION}.1
+CATEGORIES= editors
+MASTER_SITES= http://ftp.osuosl.org/pub/tdf/libreoffice/src/ \
+ http://download.go-oo.org/3.3/ \
+ http://ftp.rediris.es/mirror/TDF/libreoffice/src/ \
+ http://mirrors.supportex.net/tdf/libreoffice/src/ \
+ http://mirror.netcologne.de/tdf/libreoffice/src/ \
+ http://mirror.informatik.uni-mannheim.de/pub/mirrors/tdf/libreoffice/src/ \
+ http://ftp.uni-muenster.de/pub/software/DocumentFoundation/libreoffice/src/ \
+ http://ftp.rz.tu-bs.de/pub/mirror/tdf/tdf-pub/libreoffice/src/ \
+ http://artfiles.org/documentfoundation.org/libreoffice/src/ \
+ http://mirror.galpon.org/tdf/libreoffice/src/ \
+ http://ftp.tu-chemnitz.de/pub/tdf/libreoffice/src/ \
+ http://tdf.panu.it/libreoffice/src/ \
+ http://ftp.wh2.tu-dresden.de/pub/mirrors/tdf/libreoffice/src/ \
+ http://ftp.klid.dk/ftp/tdf/libreoffice/src/ \
+ http://gd.tuwien.ac.at/tdf/libreoffice/src/ \
+ http://archive.sunet.se/pub/Office/tdf/libreoffice/src/ \
+ http://ftp.astral.ro/mirrors/tdf/libreoffice/src/ \
+ http://ftp.roedu.net/mirrors/tdf/libreoffice/src/ \
+ http://ftp.unicamp.br/pub/tdf/libreoffice/src/ \
+ http://mirror.yongbok.net/tdf/libreoffice/src/ \
+ http://mirror3.mirrors.tds.net/pub/documentfoundation.org/libreoffice/src/ \
+ http://download.go-oo.org/src/ \
+ http://hg.services.openoffice.org/binaries/:hgOOo \
+ http://www.numbertext.org/linux/:OOoDTP
+PKGNAMESUFFIX= -legacy
+
+MAINTAINER= office@FreeBSD.org
+COMMENT= Full integrated office productivity suite
+
+CONFLICTS_INSTALL= libreoffice-[0-9]*
+
+LOFFICE_COMPONENTS= artwork base bootstrap calc components extensions \
+ extras filters help impress l10n libs-core libs-extern \
+ libs-extern-sys libs-gui postprocess sdk testing \
+ ure writer
+
+DIST_SUBDIR= libreoffice
+DISTFILES+= ${PORTNAME}-build-${LOVERSION}.tar.gz
+WRKSRC= ${WRKDIR}/${PORTNAME}-build-${LOVERSION}
+
+LODESTDIR= ${WRKDIR}/loinstall
+
+.for components in ${LOFFICE_COMPONENTS}
+DISTFILES+= ${PORTNAME}-${components}-${LOVERSION}.tar.bz2
+.endfor
+
+LICENSE_COMB= dual
+LICENSE= LGPL3 MPL
+
+# for dynamic plist generation
+PLISTD?= ${WRKDIR}/plist_dirs
+PLISTF?= ${WRKDIR}/plist_files
+
+# not tested on other platforms and at leat plist will be wrong because of LOARCH not expendanded correctly
+ONLY_FOR_ARCH= i386 amd64
+
+EXTRACT_ONLY:= ${DISTFILES}
+
+#additionnal components
+DISTFILES+= fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz \
+ 1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz \
+ cf8a6967f7de535ae257fa411c98eb88-mdds_0.3.0.tar.bz2 \
+ d0b5af6e408b8d2958f3d83b5244f5e8-hyphen-2.4.tar.gz \
+ 067201ea8b126597670b5eff72e1f66c-mythes-1.2.0.tar.gz \
+ 37282537d0ed1a087b1c8f050dc812d9-dejavu-fonts-ttf-2.32.zip \
+ ca4870d899fd7e943ffc310a5421ad4d-liberation-fonts-ttf-1.06.0.20100721.tar.gz \
+ 35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip \
+ 881af2b7dca9b8259abbca00bbbc004d-LinLibertineG-20110101.zip:OOoDTP
+
+# rely on bsdtar ability to extract .gz and .bz2 archives
+EXTRACT_CMD= ${CAT}
+EXTRACT_BEFORE_ARGS=
+
+LIB_DEPENDS= cairo.2:${PORTSDIR}/graphics/cairo \
+ xml2.5:${PORTSDIR}/textproc/libxml2 \
+ expat.6:${PORTSDIR}/textproc/expat2 \
+ icutu.48:${PORTSDIR}/devel/icu \
+ jpeg.11:${PORTSDIR}/graphics/jpeg \
+ curl.6:${PORTSDIR}/ftp/curl \
+ hunspell-1.3.0:${PORTSDIR}/textproc/hunspell \
+ poppler.6:${PORTSDIR}/graphics/poppler \
+ wpd-0.9.9:${PORTSDIR}/textproc/libwpd \
+ wpg-0.2.2:${PORTSDIR}/graphics/libwpg \
+ wps-0.2.2:${PORTSDIR}/textproc/libwps \
+ rdf.0:${PORTSDIR}/textproc/redland \
+ textcat.0:${PORTSDIR}/textproc/libtextcat \
+ lpsolve55:${PORTSDIR}/math/lp_solve
+
+BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip \
+ unzip:${PORTSDIR}/archivers/unzip \
+ gcp:${PORTSDIR}/sysutils/coreutils \
+ gpatch:${PORTSDIR}/devel/patch \
+ bash:${PORTSDIR}/shells/bash \
+ ${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \
+ ${LOCALBASE}/bin/gperf:${PORTSDIR}/devel/gperf \
+ ${LOCALBASE}/lib/libcppunit.so:${PORTSDIR}/devel/cppunit \
+ ${LOCALBASE}/lib/libmdbsql.a:${PORTSDIR}/databases/mdbtools \
+ ${LOCALBASE}/lib/libboost_regex.a:${PORTSDIR}/devel/boost-libs \
+ ${LOCALBASE}/bin/vigra-config:${PORTSDIR}/graphics/vigra
+
+USE_BDB= yes
+USE_PERL5_BUILD= yes
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+USE_PYTHON= yes
+USE_OPENSSL= yes
+WANT_GNOME= yes
+USE_BISON= build
+USE_GSTREAMER= yes
+USE_XORG= xaw
+USE_GL= gl glu
+MAKE_JOBS_SAFE= yes
+INSTALLS_ICONS= yes
+
+OPTIONS= WEBDAV "Support webdav protocol" off \
+ CUPS "Support cups for printing" on \
+ KDE4 "With Qt4/KDE4 vclplug support" off \
+ GNOME "Better integration in gnome environnement" off \
+ JAVA "Add Java support (XML Filters, macros)" off
+
+LOCALIZED_LANG?= en-US
+
+CONFIGURE_ARGS+= --without-download \
+ --with-binsuffix=no \
+ --with-dict="${LOCALIZED_LANG}" \
+ --with-myspell-dicts \
+ --with-lang="${LOCALIZED_LANG}"\
+ --disable-odk \
+ --with-build-version="FreeBSD ports ${PKGVERSION}" \
+ --with-vendor="FreeBSD ports ${PKGVERSION}" \
+ --exec-prefix=${PREFIX} \
+ --with-num-cpus=${MAKE_JOBS_NUMBER} \
+ --with-installed-ooo-dirname=${PORTNAME} \
+ --without-git \
+ --with-ooo-builddir=${WRKSRC}/build/${PORTNAME} \
+ --with-srcdir=${DISTDIR}/${DIST_SUBDIR} \
+ --with-external-tar=${DISTDIR}/${DIST_SUBDIR} \
+ --with-docdir=${DOCSDIR} \
+ --with-gnu-patch=${LOCALBASE}/bin/gpatch \
+ --with-gnu-cp=${LOCALBASE}/bin/gcp \
+ --enable-openxml \
+ --with-system-libxml \
+ --with-system-cairo --enable-cairo \
+ --with-system-boost \
+ --with-system-cppunit \
+ --with-system-zlib \
+ --with-system-icu \
+ --with-system-python \
+ --with-system-db \
+ --with-system-jpeg \
+ --with-system-expat \
+ --with-system-openssl \
+ --with-system-curl \
+ --with-system-libwpd \
+ --with-system-libwpg \
+ --with-system-libwps \
+ --with-system-poppler \
+ --with-system-redland \
+ --with-system-hunspell \
+ --with-system-libtextcat \
+ --with-system-lpsolve \
+ --with-system-vigra \
+ --with-system-mdbtools \
+ --with-fonts \
+ --with-alloc=system \
+ --with-system-stdlibs \
+ --with-system-xrender-headers \
+ --with-system-mesa-headers \
+ --disable-epm \
+ --disable-hids \
+ --disable-post-install-scripts \
+ --disable-mozilla \
+ --disable-build-mozilla \
+ --disable-kde \
+ --without-stlport \
+ --disable-nss-module \
+ --without-system-mozilla
+
+# extensions
+
+CONFIGURE_ARGS+= --enable-ext-pdfimport \
+ --enable-ext-wiki-publisher \
+ --enable-ext-report-builder
+# --enable-extra-gallery \
+# --enable-extra-template \
+# --enable-extra-sample \
+# --enable-extra-font
+
+MAN1= libreoffice.1 \
+ unopkg.1
+
+.include <bsd.port.options.mk>
+
+MAKE_ENV+= GPERF=${LOCALBASE}/bin/gperf \
+ X_LIBS=-L${LOCALBASE}/lib \
+ OPENSSL_CFLAGS=-I${OPENSSLINC} OPENSSL_LIBS=-L${OPENSSLLIB} \
+ LD_LIBRARY_PATH=. DESTDIR=${LODESTDIR}
+
+CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/db${BDB_VER} -L${LOCALBASE}/lib
+
+USE_GNOME= gtk20 desktopfileutils
+USE_AUTOTOOLS= autoconf automake:env
+
+.if defined(WITH_WEBDAV)
+CONFIGURE_ARGS+= --enable-neon --with-system-neon
+LIB_DEPENDS+= neon.27:${PORTSDIR}/www/neon29
+.else
+CONFIGURE_ARGS+= --disable-neon
+.endif
+
+.if defined(WITH_CUPS)
+CONFIGURE_ARGS+= --enable-cups
+LIB_DEPENDS+= cups.2:${PORTSDIR}/print/cups-client
+.else
+CONFIGURE_ARGS+= --disable-cups
+.endif
+
+.if defined(WITH_KDE4)
+USE_KDE4= kdelibs
+USE_QT_VER= 4
+CONFIGURE_ARGS+= --enable-kde4 QT4DIR="${QT_PREFIX}" QT4LIB="${QT_LIBDIR}" QT4INC="${QT_INCDIR}" KDE4DIR="${KDE4_PREFIX}"
+QT_COMPONENTS+= moc_build
+.else
+CONFIGURE_ARGS+= --disable-kde4
+.endif
+
+.if defined(WITH_GNOME)
+USE_GNOME+= gconf2 gnomevfs2
+CONFIGURE_ARGS+= --enable-gconf --enable-gnome-vfs
+.else
+CONFIGURE_ARGS+= --disable-gconf --disable-gnome-vfs
+.endif
+
+.if defined(WITH_JAVA)
+#additionnal distfiles needed for java
+DISTFILES+= 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip:hgOOo \
+ 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip:hgOOo \
+ 2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz:hgOOo \
+ 48d8169acc35f97e05d8dcdfd45be7f2-lucene-2.3.2.tar.gz:hgOOo \
+ a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip:hgOOo \
+ af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz:hgOOo \
+ 3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz:hgOOo \
+ 2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz:hgOOo \
+ 2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz \
+ ea570af93c284aa9e5621cd563f54f4d-bsh-2.0b1-src.tar.gz:hgOOo \
+ ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip:hgOOo \
+ 8ea307d71d11140574bfb9fcc2487e33-libbase.zip:hgOOo \
+ 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip:hgOOo \
+ 39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip:hgOOo \
+ a06a496d7a43cbdc35e69dbe678efadb-libloader.zip:hgOOo \
+ f3e2febd267c8e4b13df00dac211dd6d-flute.zip:hgOOo \
+ 5aba06ede2daa9f2c11892fbd7bc3057-libserializer.zip:hgOOo \
+ d1a3205871c3c52e8a50c9f18510ae12-libformula.zip:hgOOo \
+ f7925ba8491fe570e5164d2c72791358-libfonts.zip:hgOOo \
+ 67b42915c8432abf0a922438f00860a2-libxml.zip:hgOOo \
+ dbb3757275dc5cc80820c0b4dd24ed95-librepository.zip:hgOOo \
+ 79600e696a98ff95c2eba976f7a8dfbb-liblayout.zip:hgOOo \
+ d4c4d91ab3a8e52a2e69d48d34ef4df4-core.zip:hgOOo
+
+USE_JAVA= 1.4+
+BUILD_DEPENDS+= ant:${PORTSDIR}/devel/apache-ant \
+ ${JAVALIBDIR}/junit.jar:${PORTSDIR}/java/junit \
+ ${JAVALIBDIR}/xercesImpl.jar:${PORTSDIR}/textproc/xerces-j \
+ ${JAVALIBDIR}/xalan.jar:${PORTSDIR}/textproc/xalan-j
+
+CONFIGURE_ARGS+= --with-ant-home=${LOCALBASE}/share/java/apache-ant/ \
+ --with-junit=${JAVALIBDIR}/junit.jar \
+ --with-jdk-home=${JAVA_HOME} \
+ --with-system-xerces \
+ --with-xerces-jar=${JAVALIBDIR}/xercesImpl.jar \
+ --with-system-xml-apis \
+ --with-xml-apis-jar=/${JAVALIBDIR}/xml-apis.jar \
+ --with-system-xalan \
+ --with-xalan-jar=${JAVALIBDIR}/xalan.jar \
+ --with-serializer-jar=${JAVALIBDIR}/serializer.jar
+.else
+BUILD_DEPENDS+= xsltproc:${PORTSDIR}/textproc/libxslt
+CONFIGURE_ARGS+= --without-java
+.endif
+
+EMPTYDIRS= libreoffice/share/uno_packages/cache \
+ libreoffice/share/prereg \
+ libreoffice/basis3.3/program/plugin \
+ libreoffice/basis3.3/program/addin \
+ libreoffice/basis3.3/presets/wordbook \
+ libreoffice/basis3.3/presets/uno_packages/cache \
+ libreoffice/basis3.3/presets/template \
+ libreoffice/basis3.3/presets/temp \
+ libreoffice/basis3.3/presets/store \
+ libreoffice/basis3.3/presets/psprint/fontmetric \
+ libreoffice/basis3.3/presets/psprint/driver \
+ libreoffice/basis3.3/presets/Scripts \
+ libreoffice/basis3.3/presets/autocorr \
+ libreoffice/basis3.3/presets/backup
+
+.for LANG in ${LOCALIZED_LANG}
+EMPTYDIRS+= libreoffice/basis3.3/share/samples/${LANG}
+.endfor
+
+.include <bsd.port.pre.mk>
+pre-fetch:
+ @${ECHO_CMD}
+ @${ECHO_CMD} "you can build a localized version of libreoffice by setting"
+ @${ECHO_CMD} "LOCALIZED_LANG=xx"
+ @${ECHO_CMD} "where xx can one or more of the following:"
+ @${ECHO_CMD} "af ar as ast be-BY bg bn bo br brx bs ca-XV ca cs cy da de dgo dz el"
+ @${ECHO_CMD} "en-GB en-ZA eo es et eu fa fi fr ga gl gu he hi-IN hi hr hu id is it"
+ @${ECHO_CMD} "ja ka kid kk km kn ko kok ks ku lo lt lv mai mk ml mn mni mr my nb ne"
+ @${ECHO_CMD} "nl nn nr ns oc om or pa-IN pl pt-BR pt ro ru rw sa-IN sat sd sh si sk"
+ @${ECHO_CMD} "sl sq sr ss st sv sw-TZ ta te tg th tn tr ts ug uk ur-IN uz ve vi xh"
+ @${ECHO_CMD} "zh-CN zh-TW zu"
+ @${ECHO_CMD}
+ @${ECHO_CMD} "Current setting: ${LOCALIZED_LANG}"
+
+post-extract:
+ @${MKDIR} ${WRKSRC}/build/${PORTNAME}
+.for component in ${LOFFICE_COMPONENTS}
+ @${MV} ${WRKDIR}/${PORTNAME}-${component}-${LOVERSION}/* ${WRKSRC}/build/${PORTNAME}/
+ @${RMDIR} ${WRKDIR}/${PORTNAME}-${component}-${LOVERSION}/
+.endfor
+ @${TOUCH} ${WRKSRC}/build/${PORTNAME}/unpack
+ @${MKDIR} ${WRKSRC}/clone
+ @${TOUCH} ${WRKSRC}/clone/repos_changed
+
+post-patch:
+ @${REINPLACE_CMD} -e 's#-5.1#${BDB_VER}#g' \
+ -e 's#5.1#${BDB_LIB_NAME:S/db//}#g' \
+ ${WRKSRC}/build/${PORTNAME}/configure.in
+
+.if defined(WITH_KDE4)
+ @${REINPLACE_CMD} -e 's#moc,#moc-qt4,#g' \
+ ${WRKSRC}/build/${PORTNAME}/configure.in
+.endif
+ @${LN} -s ${MD5} ${WRKSRC}/bin/md5sum
+.if defined(WITH_JAVA)
+ @${REINPLACE_CMD} -e 's/^ANT_OPT/#ANT_OPT/g' \
+ ${WRKSRC}/build/${PORTNAME}/apache-commons/java/codec/makefile.mk \
+ ${WRKSRC}/build/${PORTNAME}/apache-commons/java/httpclient/makefile.mk \
+ ${WRKSRC}/build/${PORTNAME}/apache-commons/java/lang/makefile.mk \
+ ${WRKSRC}/build/${PORTNAME}/apache-commons/java/logging/makefile.mk
+.endif
+
+post-install:
+ @${RM} -f ${PLISTF} ${PLISTD}
+ @${RM} ${LODESTDIR}/${PREFIX}/share/applications/*.desktop
+ @${MV} ${LODESTDIR}/${PREFIX}/share/mime/packages/openoffice.xml ${LODESTDIR}/${PREFIX}/share/mime/packages/libreoffice.xml
+
+ @for img in ${LODESTDIR}/${PREFIX}/share/icons/hicolor/*/apps/ooo-*; do ${MV} $$img `${ECHO_CMD} $$img | ${SED} "s/ooo-/libreoffice-/"`; done
+ @for pix in ${LODESTDIR}/${PREFIX}/share/pixmaps/ooo-*; do ${RM} $$pix; ${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/`${BASENAME} $$pix | ${SED} "s/ooo-/libreoffice-/"` ${LODESTDIR}/${PREFIX}/share/pixmaps/; done
+.for component in base calc draw math impress writer startcenter
+ @cd ${LODESTDIR}/${PREFIX}/share/applications; ${LN} -s ../../lib/${PORTNAME}/share/xdg/${component}.desktop ${PORTNAME}-${component}.desktop
+.endfor
+ @for dir in ${EMPTYDIRS}; do ${TOUCH} ${LODESTDIR}/${PREFIX}/lib/$$dir/.keep; done
+
+ @cd ${LODESTDIR}/${PREFIX}/lib && ${FIND} -H -s * -type f -o -type l | \
+ ${SED} -e 's|^|lib/|' >> ${PLISTF}
+ @cd ${LODESTDIR}/${PREFIX}/lib && ${FIND} -d * -type d | \
+ ${SED} -e 's|^|@dirrm lib/|' >> ${PLISTD}
+
+.for subdir in icons pixmaps mime applications
+ @cd ${LODESTDIR}/${PREFIX}/share/${subdir} && ${FIND} -H -s * -type f -o -type l | \
+ ${SED} -e 's|^|share/${subdir}/|' >> ${PLISTF}
+.endfor
+
+ @${ECHO_CMD} "@unexec ${RMDIR} %D/share/applications 2>/dev/null || ${TRUE}" >> ${PLISTD}
+
+ @cd ${LODESTDIR}/${PREFIX}/bin && ${FIND} -H -s * -type f -o -type l | \
+ ${SED} -e 's|^|bin/|' >> ${PLISTF}
+
+ @${ECHO_CMD} "@exec ${LOCALBASE}/bin/update-desktop-database > /dev/null || ${TRUE}" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec ${LOCALBASE}/bin/update-desktop-database > /dev/null || ${TRUE}" >> ${TMPPLIST}
+ @${SORT} ${WRKDIR}/plist_files >> ${TMPPLIST}
+ @${SORT} -r ${WRKDIR}/plist_dirs >> ${TMPPLIST}
+
+ @cd ${LODESTDIR}/${PREFIX} ; ${FIND} . -print | ${CPIO} -adpm --quiet ${PREFIX}
+ @${LOCALBASE}/bin/update-desktop-database 2>/dev/null || ${TRUE}
+
+.include <bsd.port.post.mk>
diff --git a/editors/libreoffice-legacy/distinfo b/editors/libreoffice-legacy/distinfo
new file mode 100644
index 000000000000..5e006a63934a
--- /dev/null
+++ b/editors/libreoffice-legacy/distinfo
@@ -0,0 +1,106 @@
+SHA256 (libreoffice/libreoffice-build-3.3.3.1.tar.gz) = 2b7b35e461697aa3379bf53181dc05ecc00bfc9b83d366e2f81837ca8d464f13
+SIZE (libreoffice/libreoffice-build-3.3.3.1.tar.gz) = 14608755
+SHA256 (libreoffice/libreoffice-artwork-3.3.3.1.tar.bz2) = a09c65f1db0a953b6f68c7a63190da75fc07edc4cb6122c13317ae17471be62e
+SIZE (libreoffice/libreoffice-artwork-3.3.3.1.tar.bz2) = 21988711
+SHA256 (libreoffice/libreoffice-base-3.3.3.1.tar.bz2) = 0f26d3ffd42a184480bb59a089ea0068fcb9c2ef02a745dacf428e0b428ad54a
+SIZE (libreoffice/libreoffice-base-3.3.3.1.tar.bz2) = 2082833
+SHA256 (libreoffice/libreoffice-bootstrap-3.3.3.1.tar.bz2) = f51f0cef73b5657b5a0bb49c67da402e1a96e061da20a1ede35dcf41b3d7461f
+SIZE (libreoffice/libreoffice-bootstrap-3.3.3.1.tar.bz2) = 2751295
+SHA256 (libreoffice/libreoffice-calc-3.3.3.1.tar.bz2) = f13ecea9a05f02aab8320f5d3edbec2b53838d5d7620b0295ee39f5a0011ebac
+SIZE (libreoffice/libreoffice-calc-3.3.3.1.tar.bz2) = 9404500
+SHA256 (libreoffice/libreoffice-components-3.3.3.1.tar.bz2) = 77238933fce5cb442e60117732be3a5fc5c95b04a83a23d0d32b678d5a69cc34
+SIZE (libreoffice/libreoffice-components-3.3.3.1.tar.bz2) = 5126030
+SHA256 (libreoffice/libreoffice-extensions-3.3.3.1.tar.bz2) = 7721fa9fb53608ffcf9358de6f69b0f763b676334794f11b068d475f9824ada5
+SIZE (libreoffice/libreoffice-extensions-3.3.3.1.tar.bz2) = 4202583
+SHA256 (libreoffice/libreoffice-extras-3.3.3.1.tar.bz2) = c2e9c6a3f6e5756b714b8fd300dedf51012ee41b31a99a096998b95557fd8707
+SIZE (libreoffice/libreoffice-extras-3.3.3.1.tar.bz2) = 38706769
+SHA256 (libreoffice/libreoffice-filters-3.3.3.1.tar.bz2) = 57b48f5f2acf3bd7a1c0e6403201939b9416367e5967a292a5f4908fdb85c932
+SIZE (libreoffice/libreoffice-filters-3.3.3.1.tar.bz2) = 11949559
+SHA256 (libreoffice/libreoffice-help-3.3.3.1.tar.bz2) = 4dba3ee1f58f6c34004ffa3e7e3f88dd2e20e46018119105fe4e7fb295b0ce28
+SIZE (libreoffice/libreoffice-help-3.3.3.1.tar.bz2) = 1928379
+SHA256 (libreoffice/libreoffice-impress-3.3.3.1.tar.bz2) = 30340e8878118ed1f26f6b0be39022c378385e2c8a84a80127c501adfdddbd72
+SIZE (libreoffice/libreoffice-impress-3.3.3.1.tar.bz2) = 2606174
+SHA256 (libreoffice/libreoffice-l10n-3.3.3.1.tar.bz2) = db8fc1cfa0701e5b4f518ecfed7d0f3dd2a9000eda5f1ad9f8ded35c79984780
+SIZE (libreoffice/libreoffice-l10n-3.3.3.1.tar.bz2) = 80826598
+SHA256 (libreoffice/libreoffice-libs-core-3.3.3.1.tar.bz2) = a7002e77ecf778b109ba1e82220dc5574db6a7ce6cc77bb063fe9d2cf977c5fd
+SIZE (libreoffice/libreoffice-libs-core-3.3.3.1.tar.bz2) = 16651698
+SHA256 (libreoffice/libreoffice-libs-extern-3.3.3.1.tar.bz2) = 0372a48153bb3931d0300e89de42b5e54d408d8a5552e60fb2eb3ebe44cd27a6
+SIZE (libreoffice/libreoffice-libs-extern-3.3.3.1.tar.bz2) = 629622
+SHA256 (libreoffice/libreoffice-libs-extern-sys-3.3.3.1.tar.bz2) = 00e1e504a350cbb8a94dc66d3ae6f69961121c146033c1af696857ce76b4d3f0
+SIZE (libreoffice/libreoffice-libs-extern-sys-3.3.3.1.tar.bz2) = 38823514
+SHA256 (libreoffice/libreoffice-libs-gui-3.3.3.1.tar.bz2) = a3e9c1482f653c8db796519294a5aed3e0f3f945da3d1925a83dcb7a78b43e30
+SIZE (libreoffice/libreoffice-libs-gui-3.3.3.1.tar.bz2) = 10833787
+SHA256 (libreoffice/libreoffice-postprocess-3.3.3.1.tar.bz2) = 6c9cebfb3e7f3d2e8f3a354bcada28552a84c0806ea20255b28e4376406ebd07
+SIZE (libreoffice/libreoffice-postprocess-3.3.3.1.tar.bz2) = 42994
+SHA256 (libreoffice/libreoffice-sdk-3.3.3.1.tar.bz2) = e5795ba600e84a8565b75131975d63b29fddad1ec4b8ee5416f2ce88282e1935
+SIZE (libreoffice/libreoffice-sdk-3.3.3.1.tar.bz2) = 1710604
+SHA256 (libreoffice/libreoffice-testing-3.3.3.1.tar.bz2) = 47b2632cc564080008649e4ed5a071fb3a1feb6f8b209236aee1e1c304701a1b
+SIZE (libreoffice/libreoffice-testing-3.3.3.1.tar.bz2) = 50945720
+SHA256 (libreoffice/libreoffice-ure-3.3.3.1.tar.bz2) = ddf053aa2c5db4b41e461f1009eb9d0ff218aadb0b4fa492e627dba06873ea2b
+SIZE (libreoffice/libreoffice-ure-3.3.3.1.tar.bz2) = 6163742
+SHA256 (libreoffice/libreoffice-writer-3.3.3.1.tar.bz2) = 7d91da3cfc31595a6c0fa0835a27735e2934bd27c1c214b5abbd92c845ce4b68
+SIZE (libreoffice/libreoffice-writer-3.3.3.1.tar.bz2) = 6777324
+SHA256 (libreoffice/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz) = e6bcbfc521d23899511799c912ce21fbc003d55c3d56408e3c8dabf20fea8256
+SIZE (libreoffice/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz) = 547217
+SHA256 (libreoffice/1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz) = 6e6c53064ef6f40891ad72c06fab9f3c8fdcda80e03c9d0b21244cb1d4bf030b
+SIZE (libreoffice/1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz) = 315122
+SHA256 (libreoffice/cf8a6967f7de535ae257fa411c98eb88-mdds_0.3.0.tar.bz2) = 4d28548468bb63edf630ebfc8c14f80531f12265f8fa5694c01b401594d01dff
+SIZE (libreoffice/cf8a6967f7de535ae257fa411c98eb88-mdds_0.3.0.tar.bz2) = 43041
+SHA256 (libreoffice/d0b5af6e408b8d2958f3d83b5244f5e8-hyphen-2.4.tar.gz) = 03b9d0af693190d95bbf159df69cd34ec93ac4373cc922d902fc6b579c8617d1
+SIZE (libreoffice/d0b5af6e408b8d2958f3d83b5244f5e8-hyphen-2.4.tar.gz) = 638806
+SHA256 (libreoffice/067201ea8b126597670b5eff72e1f66c-mythes-1.2.0.tar.gz) = 9d29cba4312812a26b14effda2cf56284e70226cdccc90a83844297e3b7498ee
+SIZE (libreoffice/067201ea8b126597670b5eff72e1f66c-mythes-1.2.0.tar.gz) = 4893724
+SHA256 (libreoffice/37282537d0ed1a087b1c8f050dc812d9-dejavu-fonts-ttf-2.32.zip) = d78e33142ae37a1e085c6d1b0f0171abcd8fa626acc6d6da24212d8193df5685
+SIZE (libreoffice/37282537d0ed1a087b1c8f050dc812d9-dejavu-fonts-ttf-2.32.zip) = 4706244
+SHA256 (libreoffice/ca4870d899fd7e943ffc310a5421ad4d-liberation-fonts-ttf-1.06.0.20100721.tar.gz) = 9cdea85d1ee40160cf48fc482fbd9038b07b47d909f2091039338d39b0bb7d2f
+SIZE (libreoffice/ca4870d899fd7e943ffc310a5421ad4d-liberation-fonts-ttf-1.06.0.20100721.tar.gz) = 1324547
+SHA256 (libreoffice/35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip) = f1691e48d02effdee0701622297394451759f13e0e0b36e788847f4b3e2ba11b
+SIZE (libreoffice/35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip) = 867405
+SHA256 (libreoffice/881af2b7dca9b8259abbca00bbbc004d-LinLibertineG-20110101.zip) = 4a9c251e8ee02295fdba9d988863f19ee13ee56b9bc2aa4c16411f414ad09ab5
+SIZE (libreoffice/881af2b7dca9b8259abbca00bbbc004d-LinLibertineG-20110101.zip) = 4001063
+SHA256 (libreoffice/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip) = 1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753
+SIZE (libreoffice/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip) = 1521926
+SHA256 (libreoffice/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip) = d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370
+SIZE (libreoffice/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip) = 3519470
+SHA256 (libreoffice/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz) = 556921bf0de5c508985c95eef77b73a4388a7da1b7e703060c79c58385483bf4
+SIZE (libreoffice/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz) = 3568559
+SHA256 (libreoffice/48d8169acc35f97e05d8dcdfd45be7f2-lucene-2.3.2.tar.gz) = 5a0cd4a6e33a24ee11d3bfde50e9bbcfc237afa5d20713ffd994f90bdde193c3
+SIZE (libreoffice/48d8169acc35f97e05d8dcdfd45be7f2-lucene-2.3.2.tar.gz) = 4603398
+SHA256 (libreoffice/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip) = 75823776fb51a9c526af904f1503a7afaaab900fba83eda64f8a41073724c870
+SIZE (libreoffice/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip) = 23150
+SHA256 (libreoffice/af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz) = 12effcf3fea025bd34edbfec60a6216ca453fb27e781d8e5783caf75fd33d90e
+SIZE (libreoffice/af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz) = 80427
+SHA256 (libreoffice/3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz) = 168564a57411907432c7b191f63fb581439fed57732038c5308631afe05063ac
+SIZE (libreoffice/3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz) = 189448
+SHA256 (libreoffice/2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz) = 9775f8db678e15e9a482bbbf00b35c38da8bfc51c6dafa4531c6dd16225602fd
+SIZE (libreoffice/2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz) = 474681
+SHA256 (libreoffice/2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz) = f9a496d3418b0e15894fb351652cd4fa5ca434ebfc3ce3bb8da40defd8b097f2
+SIZE (libreoffice/2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz) = 1882664
+SHA256 (libreoffice/ea570af93c284aa9e5621cd563f54f4d-bsh-2.0b1-src.tar.gz) = 648f10fb764d000d6a68b2d4e008117900e853c197a024d1f91dbba9b91012ca
+SIZE (libreoffice/ea570af93c284aa9e5621cd563f54f4d-bsh-2.0b1-src.tar.gz) = 726942
+SHA256 (libreoffice/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip) = 64f8d737c32756713d60c22efe3978a59fa167cdeaa2d3d0a1646b1f2232b825
+SIZE (libreoffice/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip) = 2732347
+SHA256 (libreoffice/8ea307d71d11140574bfb9fcc2487e33-libbase.zip) = 9d6a8da4a4f6e201d3d7eb6293a5c01b5686d67c6df8f3cf9458df449c75846c
+SIZE (libreoffice/8ea307d71d11140574bfb9fcc2487e33-libbase.zip) = 161294
+SHA256 (libreoffice/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip) = 64585ac36a81291a58269ec5347e7e3e2e8596dbacb9221015c208191333c6e1
+SIZE (libreoffice/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip) = 9796
+SHA256 (libreoffice/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip) = 085f2112c51fa8c1783fac12fbd452650596415121348393bb51f0f7e85a9045
+SIZE (libreoffice/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip) = 153157
+SHA256 (libreoffice/a06a496d7a43cbdc35e69dbe678efadb-libloader.zip) = 54092554adf14b90d32ea0fdf2ea3de50e22644cfc1f930a3abd8b7df9633c8e
+SIZE (libreoffice/a06a496d7a43cbdc35e69dbe678efadb-libloader.zip) = 166507
+SHA256 (libreoffice/f3e2febd267c8e4b13df00dac211dd6d-flute.zip) = 13968a9ade310ee464be04380fecbeb2f591a3a462e4048ad1ebc4dae65538f5
+SIZE (libreoffice/f3e2febd267c8e4b13df00dac211dd6d-flute.zip) = 83503
+SHA256 (libreoffice/5aba06ede2daa9f2c11892fbd7bc3057-libserializer.zip) = b1c123f73fe5c48092576b1f15eee6e374697b2b361ee8b0f7762e4036ab1911
+SIZE (libreoffice/5aba06ede2daa9f2c11892fbd7bc3057-libserializer.zip) = 44748
+SHA256 (libreoffice/d1a3205871c3c52e8a50c9f18510ae12-libformula.zip) = 41099b1a7f53c9af816a1eba8a3ad9a05a3345935ae4c5697013d846477f3910
+SIZE (libreoffice/d1a3205871c3c52e8a50c9f18510ae12-libformula.zip) = 516667
+SHA256 (libreoffice/f7925ba8491fe570e5164d2c72791358-libfonts.zip) = 40549fb2995749f1c57455d1226b1e1fa1cfca635ce9d79d8de9ec625e4a82b9
+SIZE (libreoffice/f7925ba8491fe570e5164d2c72791358-libfonts.zip) = 1336993
+SHA256 (libreoffice/67b42915c8432abf0a922438f00860a2-libxml.zip) = 26b8d0f8613054120c2ea3718de88ae9ef16845d08d5a3f7a7045ab75cf363c1
+SIZE (libreoffice/67b42915c8432abf0a922438f00860a2-libxml.zip) = 101837
+SHA256 (libreoffice/dbb3757275dc5cc80820c0b4dd24ed95-librepository.zip) = 0f4cc8f5a1fb233f8101c86d5b118ef1c910c623e759da108cb729743deb1ff8
+SIZE (libreoffice/dbb3757275dc5cc80820c0b4dd24ed95-librepository.zip) = 89510
+SHA256 (libreoffice/79600e696a98ff95c2eba976f7a8dfbb-liblayout.zip) = a7907d558d77b6c980542b31546b199adf2fc8fc7ee2bb0ba3cfaf94fba57902
+SIZE (libreoffice/79600e696a98ff95c2eba976f7a8dfbb-liblayout.zip) = 1449297
+SHA256 (libreoffice/d4c4d91ab3a8e52a2e69d48d34ef4df4-core.zip) = c8e14bb686e113b126dc802d922fbafcf8fca592ea230ffc07c4672a3ab0a979
+SIZE (libreoffice/d4c4d91ab3a8e52a2e69d48d34ef4df4-core.zip) = 764464
diff --git a/editors/libreoffice-legacy/files/patch-bin__build-ooo b/editors/libreoffice-legacy/files/patch-bin__build-ooo
new file mode 100644
index 000000000000..af172980320b
--- /dev/null
+++ b/editors/libreoffice-legacy/files/patch-bin__build-ooo
@@ -0,0 +1,11 @@
+--- ./bin/build-ooo.orig 2010-11-11 15:41:38.000000000 +0100
++++ ./bin/build-ooo 2010-12-20 12:58:30.590567445 +0100
+@@ -11,7 +11,7 @@
+
+ export TARFILE_LOCATION
+
+-if test "z$BUILD_WIN32" = "z" -a "z`uname -s`" != "zSunOS" -a "z`uname -s`" != "zDarwin" -a "z`uname -s`" != "zOpenBSD"; then
++if test "z$BUILD_WIN32" = "z" -a "z`uname -s`" != "zSunOS" -a "z`uname -s`" != "zDarwin" -a "z`uname -s`" != "zOpenBSD" -a "z`uname -s`" != "zFreeBSD"; then
+ if ! test -f /proc/cpuinfo; then
+ echo "Looks like proc isn't mounted - this means almost certain"
+ echo "Java related weird build failure: please check /proc"
diff --git a/editors/libreoffice-legacy/files/patch-bin__ooinstall b/editors/libreoffice-legacy/files/patch-bin__ooinstall
new file mode 100644
index 000000000000..b9f224a8d09f
--- /dev/null
+++ b/editors/libreoffice-legacy/files/patch-bin__ooinstall
@@ -0,0 +1,11 @@
+--- ./bin/ooinstall.orig 2010-11-30 21:15:58.000000000 +0100
++++ ./bin/ooinstall 2010-12-20 12:58:30.609567023 +0100
+@@ -31,7 +31,7 @@
+ return 0;
+ }
+
+-( $^O =~ /openbsd/i ) || ( $^O =~ /darwin/i ) || ( -f "/proc/meminfo" ) || die "The installer cannot work without javaldx running, which requires /proc to be mounted";
++( $^O =~ /freebsd/i) || ( $^O =~ /openbsd/i ) || ( $^O =~ /darwin/i ) || ( -f "/proc/meminfo" ) || die "The installer cannot work without javaldx running, which requires /proc to be mounted";
+
+ suck_setup ("./setup") || suck_setup ("bin/setup") || die "can't find bin/setup";
+
diff --git a/editors/libreoffice-legacy/files/patch-build__libreoffice____desktop__scripts__unopkg.sh b/editors/libreoffice-legacy/files/patch-build__libreoffice____desktop__scripts__unopkg.sh
new file mode 100644
index 000000000000..98d959051c79
--- /dev/null
+++ b/editors/libreoffice-legacy/files/patch-build__libreoffice____desktop__scripts__unopkg.sh
@@ -0,0 +1,11 @@
+--- build/libreoffice/desktop/scripts/unopkg.sh.orig 2010-12-12 21:12:42.000000000 +0100
++++ build/libreoffice/desktop/scripts/unopkg.sh 2011-02-08 07:56:57.385242809 +0100
+@@ -45,7 +45,7 @@
+
+ # this is a temporary hack until we can live with the default search paths
+ case "`uname -s`" in
+-OpenBSD)
++OpenBSD|FreeBSD)
+ sd_prog1="$sd_prog/../basis-link/program"
+ sd_prog2="$sd_prog/../basis-link/ure-link/lib"
+ LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
diff --git a/editors/libreoffice-legacy/files/patch-build__libreoffice__configure.in b/editors/libreoffice-legacy/files/patch-build__libreoffice__configure.in
new file mode 100644
index 000000000000..0a507d2d8d29
--- /dev/null
+++ b/editors/libreoffice-legacy/files/patch-build__libreoffice__configure.in
@@ -0,0 +1,11 @@
+--- ./build/libreoffice/configure.in.orig 2010-12-17 23:08:36.000000000 +0100
++++ ./build/libreoffice/configure.in 2010-12-20 14:42:55.766436619 +0100
+@@ -2022,7 +2022,7 @@
+ dnl ===================================================================
+ AC_MSG_CHECKING([for GNU tar])
+ for a in $GNUTAR gtar gnutar tar; do
+- $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null
++ $a --version 2> /dev/null | grep bsdtar 2>&1 > /dev/null
+ if test $? -eq 0; then
+ GNUTAR=$a
+ break
diff --git a/editors/libreoffice-legacy/files/patch-build__libreoffice__oox__util__makefile.mk b/editors/libreoffice-legacy/files/patch-build__libreoffice__oox__util__makefile.mk
new file mode 100644
index 000000000000..3daefd59fbbb
--- /dev/null
+++ b/editors/libreoffice-legacy/files/patch-build__libreoffice__oox__util__makefile.mk
@@ -0,0 +1,10 @@
+--- ./build/libreoffice/oox/util/makefile.mk.orig 2010-11-11 16:18:11.000000000 +0100
++++ ./build/libreoffice/oox/util/makefile.mk 2010-12-20 12:58:30.627567313 +0100
+@@ -79,6 +79,7 @@
+ $(MSFILTERLIB) \
+ $(UNOTOOLSLIB) \
+ $(XMLOFFLIB) \
++ -lcrypto \
+ $(TOOLSLIB)
+
+ # link openssl, copied this bit from ucb/source/ucp/webdav/makefile.mk
diff --git a/editors/libreoffice-legacy/files/patch-build__libreoffice__padmin__source__spadmin.sh b/editors/libreoffice-legacy/files/patch-build__libreoffice__padmin__source__spadmin.sh
new file mode 100644
index 000000000000..facba8878da2
--- /dev/null
+++ b/editors/libreoffice-legacy/files/patch-build__libreoffice__padmin__source__spadmin.sh
@@ -0,0 +1,17 @@
+--- build/libreoffice/padmin/source/spadmin.sh.orig 2011-02-07 15:14:56.498245000 +0100
++++ build/libreoffice/padmin/source/spadmin.sh 2011-02-07 17:38:31.692337005 +0100
+@@ -43,6 +43,14 @@
+ sd_prog=`pwd`
+ cd "$sd_cwd"
+
++case "`uname -s`" in
++ OpenBSD|FREEBSD)
++ sd_prog1="$sd_prog/../basis-link/program"
++ sd_prog2="$sd_prog/../basis-link/use-link/lib"
++ LD_LIRBARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
++ export LD_LIBRARY_PATH
++ ;;
++esac
+ #collect all bootstrap variables specified on the command line
+ #so that they can be passed as arguments to javaldx later on
+ for arg in $@
diff --git a/editors/libreoffice-legacy/files/patch-build__libreoffice__scripts__soffice.sh b/editors/libreoffice-legacy/files/patch-build__libreoffice__scripts__soffice.sh
new file mode 100644
index 000000000000..83b92e28bddc
--- /dev/null
+++ b/editors/libreoffice-legacy/files/patch-build__libreoffice__scripts__soffice.sh
@@ -0,0 +1,11 @@
+--- build/libreoffice/desktop/scripts/soffice.sh.orig 2010-12-12 21:12:42.000000000 +0100
++++ build/libreoffice/desktop/scripts/soffice.sh 2011-01-30 09:50:00.890272369 +0100
+@@ -64,7 +64,7 @@
+
+ # this is a temporary hack until we can live with the default search paths
+ case "`uname -s`" in
+-OpenBSD)
++OpenBSD|FreeBSD)
+ sd_prog1="$sd_prog/../basis-link/program"
+ sd_prog2="$sd_prog/../basis-link/ure-link/lib"
+ LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
diff --git a/editors/libreoffice-legacy/files/patch-build__libreoffice__solenv__bin__ooinstall b/editors/libreoffice-legacy/files/patch-build__libreoffice__solenv__bin__ooinstall
new file mode 100644
index 000000000000..1ced95766ecb
--- /dev/null
+++ b/editors/libreoffice-legacy/files/patch-build__libreoffice__solenv__bin__ooinstall
@@ -0,0 +1,11 @@
+--- ./build/libreoffice/solenv/bin/ooinstall.orig 2010-11-30 21:17:23.000000000 +0100
++++ ./build/libreoffice/solenv/bin/ooinstall 2010-12-20 12:58:30.630567408 +0100
+@@ -14,7 +14,7 @@
+ $path = '';
+ $do_link = 0;
+
+-( $^O =~ /openbsd/i ) || ( $^O =~ /darwin/i ) || ( -f "/proc/meminfo" ) || die "The installer cannot work without javaldx running, which requires /proc to be mounted";
++( $^O =~ /freebsd/i ) || ( $^O =~ /openbsd/i ) || ( $^O =~ /darwin/i ) || ( -f "/proc/meminfo" ) || die "The installer cannot work without javaldx running, which requires /proc to be mounted";
+
+ # Workaround for system Mozilla
+ if ( $ENV{'SYSTEM_MOZILLA'} eq 'YES' ) {
diff --git a/editors/libreoffice-legacy/pkg-descr b/editors/libreoffice-legacy/pkg-descr
new file mode 100644
index 000000000000..e1861fb0092b
--- /dev/null
+++ b/editors/libreoffice-legacy/pkg-descr
@@ -0,0 +1,6 @@
+LibreOffice is the free power-packed Open Source personal productivity suite for
+Windows, Macintosh and Linux, that gives you six feature-rich applications for
+all your document production and data processing needs: Writer, Calc, Impress,
+Draw, Math and Base.
+
+WWW: http://www.libreoffice.org/