libreoffice 4 under netbsd with pkgsrc (en)

Download LibreOffice 4 under NetBSD with pkgsrc (en)

If you can't read please download the document

Upload: ryo-onodera

Post on 28-May-2015

500 views

Category:

Technology


2 download

DESCRIPTION

LibreOffice 4 under NetBSD with pkgsrc English version

TRANSCRIPT

  • 1. LibreOffice 4 under NetBSD (with pkgsrc)Ryo ONODERA 2013-11-18 Kanto Region LibreOffice Offline Meeting#10

2. Who am I? Name: Ryo ONODERAE-mail: [email protected] / [email protected]: @ryo_onpkgsrc developer since 2010Working on LibreOffice under NetBSD for pkgsrc since 2013-09-15 http://pkgsrc.se/[email protected] shows my maintainerships of pkgsrc packages 2 3. Abstract Successfully built LibreOffice 4.1.1.2 under NetBSD/amd64 and NetBSD/i386 To share build procedure, I have written pkgsrc Makefile Under NetBSD 6.*, LibreOffice works properly, but LibreOffice under NetBSD 5.2.* is not working properly now Now pkgsrc has LibreOffice 4.1.3.2 in its tree3 4. What is NetBSD? NetBSD is one of Berkeley Software Distribution (BSD)s derivatives. The other BSD is show blow OpenBSDDragonFly FreeBSDMirBSD etc.These BSD has its own kernel, and not like Linux distributions (they does not share kernel).4 5. What is pkgsrc? Originally, FreeBSDs Ports had ported to NetBSD Pkgsrc is cross-platform. It is ported to 21 platforms (shown in release announcement of pkgsrc-2013Q3 branch) AIX, BSD/OS, Cygwin, OS X, DragonFly, FreeBSD, FreeMiNT, GNU/kFreeBSD, HP-UX, Haiku, IRIX, Interix/SFU/SUA, Linux, Minix3, MirBSD, NetBSD, OSF1, OpenBSD, QNX, Solaris/illumos, UnixWareTo use a package, cd to pkgsrc/category/packagename directory, and type make install. Then source tarball is fetched, built, and installed. Every 3-month, stable branch is released. Most recent stable branch is pkgsrc2013Q3 and it is released 2013-09-30.5 6. Typical pkgsrc files cat MakefileDISTNAME=CATEGORIES=MASTER_SITES=${MASTER_SITE_XORG:=app/}EXTRACT_SUFX=.tar.bz2xauth-1.0.8x11MAINTAINER=joerg@NetBSD.orgHOMEPAGE=http://xorg.freedesktop.org/COMMENT=X authentication utility$NetBSD: distinfo,v 1.5 2013/10/11 20:36:20 wiz Exp $cat distinfoSHA1 (xauth-1.0.8.tar.bz2) = 481d42acbfe30f8593be07d70c258b18f8c877db RMD160 (xauth-1.0.8.tar.bz2) = f0bcd17d10d5dd7cec0825298403fecb9d29dff5 Size (xauth-1.0.8.tar.bz2) = 146794 bytesGNU_CONFIGURE= USE_TOOLS+=yespkg-config .include "../../x11/libXext/buildlink3.mk".include "../../x11/libXmu/buildlink3.mk".include "../../mk/bsd.pkg.mk"cat PLIST @comment $NetBSD: PLIST,v 1.2 2013/10/11 20:36:20 wiz Exp $bin/test_xauthbin/xauthman/man1/xauth.16 7. File for llibreoffice4 package # $NetB SD: Makefi le,v 1.6 2013/11/03 03:40:49 ryoon E xp $ V ER=4. 1.3.2DISTNA M =libreoff ice-${V ER} E P KGNA M =libreoff ice4-${VE R} E CAT GORIE S=misc E MAS T R_SITE S= http: //download. documentfoundation.org/l ibreoffice/src/4.1.3/ E E XT CT_S UFX= . tar.xz RA MAINT INER= ryoon@NetB SD.org A HOMEP AGE = http: //www.li breoffice.org/ COMM NT= Office productivi ty suit e, 4.x branch E LI CE NS E= gnu-lgpl-v3 # Wit h -O2, when preference window i s opened, soffice.bin crashes with S IGFPE . .include "../. ./mk/bsd.prefs.mk" .if !empty(MACHINE _P LA T FORM:M NetB S D-5.*) B UILDLINK _TRANSFORM rename:-O2: -O += .endif # LibreOfice's M akefile has its own pararell build mechanism. A void conflict. MAK E_JOBS _S A F no E= CHE CK _S HLIB S_SUPP ORTED= noDIST_S UB DI R=li breoff ice P YT HON_VE RSIONS _A CCE P T D= 33 E LO_B OOT T P= ${DI STNAME} S RA LO_COMP ONE NTS= dict ionari es hel p translati ons DISTF ILES +=${LO_B OOTST P}${E XTRA CT_S UFX } RAE XT CT_ONLY= ${LO_B OOTSTRA P}${E X T CT UFX } RA RA _S .for com ponent in ${LO_COM ONE NT P S} DISTF ILES +=l ibreoff ice-${component}-${V ER}.tar.xzE XT CT_ONLY+= RAlibreoff ice-${component}-${V ER}.t ar.xz.endfor MORE_DIS T FILES = 0168229624cfac409e766913506961a8-ucpp-1.3. 2.tar.gz0279a21fab6f245e85a6f 85f ea54f511-source-code-font-1.009.t ar.gz0be45d54cc5e1c2e3102e32b8c190346-liberation-fonts-ttf -1.07.1.tar.gz5c781723a0d9ed6188960defba8e91cf-liberati on-fonts-ttf-2.00.1.t ar.gz1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_A F s-314.t ar.gzM 1e9ddfe25ac9577da709d7b2ea36f939-source-sans-font-1.036.tar.gz1f 24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz2a177023f9ea8ec8bd00837605c5df 1b-jakarta-tomcat-5.0. 30-src. tar. gz625ff5f2f 968dd908bca43c9469d6e6b-com mons-l ang-2.4-src.t ar.gz2c9b0f83ed5890af02c0df1c1776f 39b-com mons-httpcli ent -3.1-src.tar.gz3404ab6b1792ae5f16bbd603bd1e1d03-libf ormula-1. 1.7.zi p35c94d2df8893241173de1d16b6034c0-swingExSrc.zip35efabc239af896dfb79be7ebdd6e6b9-gent iumbasic-fonts-1.10.zip39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip3bdf40c0d199af31923e900d082ca2dd-libfonts-1. 1.6.zi p3c219630e4302863a9a83d0ef de889db-commons-logging-1.1.1-src. tar. gz46e92b68e31e858512b680b3b61dc4c1-m ythes-1.2. 3.t ar.gz36271d3fa0d9dec1632029b6d7aac925-libl angtag-0. 5.1.tar.bz2798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip7a15edea7d415ac5150ea403e27401fd-open-sans-font -ttf-1.10.tar.gz8ce2f cd72becf 06c41f7201d15373ed9-l ibrepository-1.1.6.zip97b2d4dba862397f446b217e2b623e71-libl oader-1.1.6. zipb85436266b2ac91d351ab5684b181151-libwpg-0.2.2.tar.bz2a2f6010987e1c601274ab5d63b72c944-hyphen-2.8.4.tar.gza7983f859eafb2677d7ff386a023bc40-xsltml_2.1. 2.zipace6ab49184e329db254e454a010f56d-libxm -1.1.7. ziplOnly Makefile is shown in left column of this page.2e482c7567908d334785ce7d69ddff f7-comm ons-codec-1. 6-src.tar.gzba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zipb2371dc7cf 4811c9d32146eec913d296-libcm s-0.3.0.tar.gzi c3c1a8ba7452950636e871d25020ce0d-pt-serif-font-1.0000W.tar.gz46eb0e7f213ad61bd5dee0c494132cb0-libwps-0. 2.9.tar.bz2db60e4fde8dd6d6807523deb71ee34dc-libl ayout-0.2.10.zi pd8bd5eed178db6e2b18eeed243f85aa8-flut e-1.1.6.zi pe7a384790b13c29113e22e596ade9687-LinLibert ineG-20120116.zipea570af93c284aa9e5621cd563f54f4d-bsh-2.0b1-src.tar.gzeeb2c7ddf0d302f ba4bfc6e97eac9624-l ibbase-1.1.6. zipf872f4ac066433d8ff92f5e316b36f f9-dej avu-fonts-ttf-2.33.zipf94d9870737518e3b597f9265f 4e9803-l ibserializer-1.1. 6.ziplibcdr-0.0.14.tar.bz2libm spub-0. 0.6.tar.bz28473296c671b6e3dd8197f4145e0854b-libodfgen-0.0.2.tar.bz2b63e6340a02ff 1cacf eadb2c42286161-JLanguageT ool-1.7.0.tar.bz205f84c95b610c21c5fd510d10debcabf-mari adb-native-client-1.0.0.tar.bz208c85a6d6d793daee14e10e22eefdc4b-m dds_0.8.1. tar.bz2ea91f 2fb4212a21d708aced277e6e85a-vigra1. 4.0.tar.gz185d60944ea767075d27247c3162b3bc-unowinreg.dll # libm waw-0. 1.10.t ar.bz2 # 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0. zip # ac4781e01619be13461bb2d562b94a7b-cppunit-1.13.1.tar.gz # ea2acaf 140ae40a87a952caa75184f 4d-liborcus-0.5.1.tar.bz2 # 26b3e95ddf 3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz # libvisio-0.0. 28. tar.bz2 # 972afb8fdf02d9e7517e258b7fa7f0eb-libwpd-0.9.8.tar.bz2 # ae330b9493bd4503ac390106f f6060d7-libextt extcat-3.4.3. tar. bz2 .for md in ${M ORE_DIS T FILE S} DISTF ILES +=${m d}S IT S.${md}= Ehttp: //dev-www. libreoff ice.org/src/.endfor DISTF ILES +=e7a384790b13c29113e22e596ade9687-LinLiberti neG-20120116. zip S IT S.e7a384790b13c29113e22e596ade9687-LinLiberti neG-20120116. zip=htt p:// www. num E bertext.org/ linux/ DISTF ILES +=185d60944ea767075d27247c3162b3bc-unowi nreg.dll S IT S.185d60944ea767075d27247c3162b3bc-unowi nreg.dl l=http: //download.go-oo.org/ extern/ E .include "options. m k" .include "../. ./mk/bsd.prefs.mk" # tar: Invalid header, starting valid header search. E XT CT_USI NG= RA WRK SRC=gtar${WRK DIR}/${LO_BOOT T S RAP }B UILD_DE PE NDS +=p5-A rchive-Zip-[0-9]*:. ./../ archivers/p5-Archi ve-Z ip# dm ake script s use relative path with -rpath-l ink ld argument s, whi ch # is a no-go wi th norm pkgsrc wrappers. al # dm ake is slowl y beeing removed from the LibreOf fice build process # and thi s option wil l hopef ully becom unneeded in the f uture e WRA PP E R_SK IP _T NS F RA ORM =yes USE _LA NGUA GE S+= USE _LI BTOOL=c c++yes# GUN t ar i s real ly needed. S ome Makefil es depends on GNUTAR. USE _T OOLS +=autom ake bash bison gmake gt ar perl pkg-config unzip zipPT HRE AD_OP T += SrequireHAS _CONF IGURE =yes# Do not use /t m outsi de of WRK SRC. p, CONF IGURE _E NV +=T P DIR=${WRK SRC}/ tmp MCONF IGURE _A RGS+=--prefix=${DE S T DIR}${P RE F X}/ ${P KGNA ME_NOREV } ICONF IGURE _A RGS+=--disable-ccacheCONF IGURE _A RGS+=--disable-dbusCONF IGURE _A RGS+= CONF IGURE _A RGS+= CONF IGURE _A RGS+=--disable-epm --disable-fetch-external --disable-gconfCONF IGURE _A RGS+=--disable-gnom s e-vfCONF IGURE _A RGS+=--disable-kde4CONF IGURE _A RGS+= CONF IGURE _A RGS+=--disable-lockdown --disable-odkCONF IGURE _A RGS+=--disable-openglCONF IGURE _A RGS+=--disable-randr-l inkCONF IGURE _A RGS+=--disable-systrayBut it is too long to see your eyes.# Enabli ng crashrep causes error. Non-offi cial build does not need it. CONF IGURE _A RGS+=--disable-crashdumpCONF IGURE _A RGS+=--enabl e-ext-presenter-m inimizer# Enabli ng GIO causes error. losessioninstal l.com ponent not found. CONF IGURE _A RGS+= CONF IGURE _A RGS+=--disable-gio --enabl e-gstreamerCONF IGURE _A RGS+=--enabl e-gtk3CONF IGURE _A RGS+=--enabl e-l ockdownCONF IGURE _A RGS+= CONF IGURE _A RGS+=--enabl e-odk --enabl e-python=system#CONF GURE _ARGS += --enabl e-release-build I CONF IGURE _A RGS+=--enabl e-ext-wiki-publi sherCONF IGURE _A RGS+=--enabl e-ext-nlpsol verCONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi th-alloc=system --wi th-compat-oowrappersCONF IGURE _A RGS+=--wi th-ext ernal-t ar=${DISTDIR}/${DIS T UBDIR} _SCONF IGURE _A RGS+=--wi th-f ontsCONF IGURE _A RGS+= CONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi th-l ang="ALL" --wi th-myspell-dict s --wi th-parallelism =${MAK E _JOB S:Q}CONF IGURE _A RGS+=--wi th-system-cluceneCONF IGURE _A RGS+=--wi th-system-li bxmlCONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi th-system-boost --wi th-boost-libdir=${B UILDLINK_PREFIX .boost-libs}/ libCONF IGURE _A RGS+=--wi th-system-cairoCONF IGURE _A RGS+=--wi th-system-curlCONF IGURE _A RGS+= CONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi th-system-dicts --wi th-system-expat --wi th-system-harfbuzzCONF IGURE _A RGS+=--wi th-system-hunspel lCONF IGURE _A RGS+=--wi th-system-icuCONF IGURE _A RGS+= CONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi th-system-jars --wi th-system-jpeg --wi th-system-lcm s2CONF IGURE _A RGS+=--wi th-system-li bexttextcatCONF IGURE _A RGS+=--wi th-system-li bpngCONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi th-system-li bvi sio --wi th-system-li bwpdCONF IGURE _A RGS+=--wi th-system-li bxmlCONF IGURE _A RGS+=--wi th-system-lpsolveCONF IGURE _A RGS+= CONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi th-system-mesa-headers --wi th-system-nss --wi th-system-openldapCONF IGURE _A RGS+=--wi th-system-opensslCONF IGURE _A RGS+=--wi th-system-li bmwawCONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi th-system-orcus --wi th-system-popplerCONF IGURE _A RGS+=--wi th-system-post gresqlCONF IGURE _A RGS+=--wi th-system-redlandCONF IGURE _A RGS+= CONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi th-system-neon --wi th-system-zlib --wi thout-system-beanshell# internal vi gra should be used for effective developement. CONF IGURE _A RGS+= CONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi thout-system-vigra --wi th-vendor="pkgsrc" --wi thout-doxygenCONF IGURE _A RGS+=--wi thout-junitCONF IGURE _A RGS+=--wi thout-krb5CONF IGURE _A RGS+= CONF IGURE _A RGS+=--wi thout-gssapi --wi thout-system-apache-com monsCONF IGURE _A RGS+=--wi th-system-cppunitCONF IGURE _A RGS+=--wi thout-system-jf reereport# internal sane should be used for effective developement. CONF IGURE _A RGS+=--wi thout-system-saneCONF IGURE _A RGS+=--wi thout-system-servl et-api# m REP LA CE_PE RL are needed. ore REP LA CE _P E RL=sd/res/ webvi ew/editpic.pl REP LA CE _P E RL+= sd/res/ webview/poll.pl REP LA CE _P E RL+= sd/res/ webview/savepic. pl REP LA CE _P E RL+= sd/res/ webview/show.pl REP LA CE _P E RL+= sd/res/ webview/webview.pl LO_P ROGRA MS=sbase scalc sdraw simpress sm soffi ce swriter ath# Base depends on java, we don't i nst all t he icon LO_DES K T OP_F ILES =calc.desktop draw.desktop im press.desktop math.desktop st artcent er.desktop writer.desktop CONF IGURE _S CRIP T =./autogen.shMAK E_ENV+=ROOT_USE R=${ROOT_USE R}MAK E_ENV+=ROOT_GROUP =${ROOT _GROUP }B UILD_M KE _F GS += VE RB OSE =yes A LA B UILD_T RGE T A =dev-installB UILDLINK _TRANSFORM rm -ldl += : INSTALLA T ION_DIRS =bin share/applicati onspost-extract : ${M DIR} -p ${WRK SRC}/src K .for md in ${M ORE_DIS T FILE S} ${LN} -s ${DIS T DIR}/${DIS T _SUB DIR}/${m ${WRK S RC}/src/${m d} d} .endfor mkdir ${WRKS RC}/tm p do-instal l: cd ${WRKS RC} && make install post-i nst all: .for f i n ${LO_P ROGRA M } S cd ${DE STDIR}${P RE F }/bin & & ${LN} -s ../${PK GNA M _NORE V }/program ${f} IX E / .endfor .for f i n ${LO_DE SK T OP_F ILES } cd ${DE STDIR}${P RE F }/share/applications & & ${LN} -s ${DES T IX DIR}${PREFIX }/${PK GNA M _NORE V}/share/ xdg/${f} E .endfor .include "../. ./convert ers/ libvisi o/buil dlink3. m k" .include "../. ./convert ers/ libwpd/buildlink3.mk" .include "../. ./convert ers/ libwpg/buildlink3.mk" .include "../. ./convert ers/ libwps/buildlink3.mk" .include "../. ./convert ers/ libmwaw/buildlink3.mk" .include "../. ./convert ers/ orcus/ bui ldl ink3.mk" .include "../. ./databases/ db4/buildlink3. m k" .include "../. ./databases/ openldap-cl ient/buildl ink3.mk" .include "../. ./databases/ shared-mime-info/buil dlink3.mk" .include "../. ./databases/ uni xodbc/buildlink3.mk" .include "../. ./mk/pgsql.buildlink3. m k" .include "../. ./devel/boost-libs/buil dli nk3.m k" .include "../. ./devel/cppunit/ bui ldli nk3.mk" .include "../. ./devel/gperf /buildl ink3.mk" .include "../. ./devel/li bexeci nfo/buildlink3.mk" .include "../. ./devel/nss/buil dlink3.mk" .include "../. ./devel/zlib/buil dlink3.mk" .include "../. ./fonts/fontconfi g/buildlink3.m k" .include "../. ./fonts/harfbuzz/buildl ink3.mk" .include "../. ./mk/j peg.buildl ink3.mk" .include "../. ./graphics/cairo/buildl ink3.mk" .include "../. ./graphics/freetype2/buil dlink3. m k" .include "../. ./graphics/gdk-pixbuf2-xlib/ buil dlink3.m k" .include "../. ./graphics/lcm s2/buildlink3.m k" .include "../. ./graphics/librsvg/buil dli nk3.m k" .include "../. ./graphics/png/buil dlink3.mk" #. incl ude ".. /../graphi cs/sane-backends/bui ldli nk3.mk" #. incl ude ".. /../graphi cs/vigra/buildlink3.m k" .include "../. ./lang/python/appli cat ion.mk" .include "../. ./math/lp_solve/buildl ink3.mk" .include "../. ./mult im edia/gstream er0.10/bui ldli nk3.mk" .include "../. ./mult im edia/gst-pl ugi ns0.10-base/buildl ink3.mk" .include "../. ./mult im edia/gstream er1/buildli nk3.mk" .include "../. ./mult im edia/gst-pl ugi ns1-base/buildl ink3.mk" .include "../. ./print /cups/buil dlink3.mk" .include "../. ./print /poppler-cpp/ bui ldl ink3.mk" .include "../. ./print /poppler-includes/buil dlink3. m k" .include "../. ./sysutils/deskt op-file-ut ils/ desktopdb.mk" .include "../. ./textproc/expat /buildl ink3.mk" .include "../. ./textproc/hunspell /buildlink3.mk" .include "../. ./textproc/icu/buildlink3. m k" .include "../. ./textproc/libclucene/bui ldli nk3.m k" .include "../. ./textproc/libxml2/buil dli nk3.m k" .include "../. ./textproc/libxsl t/buildlink3. m k" .include "../. ./textproc/redland/buil dli nk3.m k" .include "../. ./textproc/libext textcat/buildlink3.mk" .include "../. ./textproc/m ythes/buil dli nk3.m k" .include "../. ./www/curl/buil dlink3.mk" .include "../. ./www/neon/buildl ink3.mk" .include "../. ./x11/ gtk2/buildlink3.mk" .include "../. ./x11/ gtk3/buildlink3.mk" .include "../. ./x11/ libX 11/buildl ink3.mk" .include "../. ./x11/ libX cursor/buildlink3. m k" .include "../. ./x11/ libX ext/buildlink3. m k" .include "../. ./x11/ libX fixes/ bui ldli nk3.mk" .include "../. ./x11/ libX i/buildlink3. m k" .include "../. ./x11/ libX inerama/ bui ldl ink3.mk" .include "../. ./x11/ libX randr/ bui ldli nk3.mk" .include "../. ./x11/ libX render/buildlink3. m k" .include "../. ./x11/ libX t/buildlink3. m k" .include "../. ./mk/dlopen. bui ldli nk3.mk" .include "../. ./mk/pthread.buildl ink3.mk" .include "../. ./mk/bsd.pkg.mk"7 8. Abstruct of build process In Kanto region LibreOffice Offline Meeting #8, the following wiki page is shown. Basically my procedure is as same as it. https://wiki.documentfoundation.org/Development/BuildingOnLinux I have decided to build LibreOffice from tarball of 4.1.1.2. For pkgsrc, build from tarball is easiest. libreoffice-help-4.1.1.2.tar.xzlibreoffice-dictionaries-4.1.1.2.tar.xzlibreoffice-4.1.1.2.tar.xzlibreoffice-translations-4.1.1.2.tar.xzPkgsrc has packages for LibreOffice 3. I have not tested them yet, but I will use their Makefile for my LibreOffice 4 package (pkgsrc/misc/libreofficepkgsrcl/wip/libreofficepkgsrc/wip/libreoffice-devel) Develop under NetBSD/amd64 6.99.23 (aka current), and confirm other platforms8 9. Study on autogen.sh In short, generate configure from configure.acAnd pass its arguments to configure shell scriptpkgsrc Makefile should have following lines. HAS_CONFIGURE=yes CONFIGURE_SCRIPT=./autogen.sh Configure is re-generated from configure.ac every run of autogen.sh, so patch to configure is non-sense.9 10. Study on configure At first, run ./configure help and investigate output of it. Pkgsrc has GNU_CONFIGURE=yes option for configure script from GNU Autotools. But in this case, I have choose HAS_CONFIGURE=yes (because configure is not directly invoked)Many and many LibreOffice specific options (--disable-odk etc.)Many and many --with-system-* options. With this option. We can choose internal/external libraries. Most important option for pkgsrc. --disable-fetch-external disable tarball downloading during build. For pkgsrc, all tarball should be downloaded previously. Look inside configure and configure.ac Some test clauses use == instead of =. This should be fixed for portability.10 11. First trial harfbuzz library is needed and it should be support icu. pkgsrcs harfbuzz had not supported icu by default. I have changed pkgsrcs default option for harfbuzz to enable icu by default. Side effect of disabling downloading. Run make build and I have gotten tarball lacking messages. I had fixed one by one. But it is very inefficient. It takes about 15 minutes for one fix. I have done grep -R not-found-tarball-name, I have found download.lst file, that is a list of tarball.11 12. First fix Convert download.lst to pkgsrc Makefile, and I have found some libraries are in pkgsrc, and set with-system-*. Change prefix to /usr/pkg/libreoffice4-4.1.1.2 LibreOffices tarballs need BSD tar/GNU tar. NetBSDs default tar (libarchive based one) is not sufficient. LibreOffices buid process needs GNU tar, and I have decided to use GNU tar for extract tarballs. I have written Java option conditional, but it has typo and Java option is always off...12 13. Second trials Some errors are fixed. e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip is needed. Download from http://www.numbertext.org/linux/ . Object files etc is created under /tmp. In pkgsrc way, all working files should be located under ${WRKDIR}. So I have defined CONFIGURE_ENV+=TMPDIR=$ {WRKSRC}/tmp (WRKSRC is subdirectory of WRKDIR) Some libraries need the patches for NetBSD build. Such libraries are set withsystem-* and built outside of LibreOffice build. (Now I know patching procedure for internal libraries) It seems that some functionalities are not useful for non official build (--disablecrashdump) or I cannot fix the error (--disable-gio). According to Arch Linuxs PKGBUILD, for sane and vigra, only include file is needed. So I convert these libraries to internal. Doxygen is also disabled explicitly.13 14. Errors and patches Build progress, butThere are some errors. These errors are fixed with patches. rsc (resource compiler?) command dislike -pthread option that is derived from CFLAGS. Remove CFLAGS from rsc commandline patches/patchsolenv_gbuild_AllLangResTarget.mk When installing some files, install command specifies user/group = root/root. For unprivileged build, use users UID/GID instead. patches/patchsysui_CustomTarget__slackware.mk (NetBSD build use Slackware makefile)Some libraries cannot build without patches, These libraries are convert to with-system-*.14 15. First successful build Non-Java and non language pack version of LibreOffice is build successfully. Pkgsrc has PLIST file that lists all installed files. I have created it. Windows size is odd, but it seems that each LinreOffice applications work properly.15 16. For second successful build Java support conditional in pkgsrc Makefile is fixed. It is pasto. LibreOffice 4 needs hsqldb 1.8.x, but 1.8.x is not built with OpenJDK7. And pkgsrc has only OpenJDK7, no OpenJDK6. LibreOffice 4 requires hsqldb.jar only, hsqljdbc.jar or other libraries are not required. So I have decided to use official distribution of 1.8.x of hsqldb. 185d60944ea767075d27247c3162b3bc-unowinreg.dll is needed even under NetBSD. Download from http://download.go-oo.org/extern/ . (Yuji Yamano found that this file can be empty file under Unix like OSes, thank you) With Java support, it takes about 5 hours to build LibreOffice (Machine spec: Intel Core i5 4-core 1.7GHz, RAM 4GB, SSD storage)16 17. Third successful build Language packs are not built yet.I have decided to build ALL language packs.Change with-lang= to with-lang=ALL onlyIt takes 9 hours to build on my machine.LibreOffice detects locale and change its user interface language.17 18. Assignments 1/2 LibreOffices binaries does not have sane RPATH. I use pkgsrc as developer mode (PKG_DEVELOPER=yes), and pkgsrec framework detects invalid RPATH and I have gotten the errors. It seems very heavy problem. I have set CHECK_SHLIBS_SUPPORTED=no and disable binary RPATH checks by pkgsrc. LibreOffice has its own CPU number detection mechanism for its build. Pkgsrc also has parallel build mechanism. They conflict each other. I have decided to disable pkgsrcs machanism. To reduce build time, use more external libraries.18 19. Assignment 2/2 I want to build under DragonFly, FreeBSD, OpenBSD with pkgsrc, but many packages from pkgsrc are broken. I will fix them. My primary target is DragonFly/i386 3.4.3 Under NetBSD 5.2.*, there are many SIGSEGV crash in libvcllo.so. The conbination of boost library, gcc, and libvcllo is bad. I cannot find the solution yet. I have found some Microsoft PowerPoint files cause freeze. These files are confidential, and how to report this bug...19 20. License of this document This article is licensed under CC-BY 3.0 Unported. See http://creativecommons.org/licenses/by/3.0/deed.en_US20 21. Fin.21