diff options
author | hira <hira@pkgsrc.org> | 2008-10-25 15:18:17 +0000 |
---|---|---|
committer | hira <hira@pkgsrc.org> | 2008-10-25 15:18:17 +0000 |
commit | 1f22cabd722f594c40d5abcf1a33ff2412e1880f (patch) | |
tree | 53a879be03d9384d53c7d8d91997bc8093a73dae /misc/openoffice3 | |
parent | 1e2f2b158378f0fd5010623f37d6d92e3e5d2cba (diff) | |
download | pkgsrc-1f22cabd722f594c40d5abcf1a33ff2412e1880f.tar.gz |
- Use languagepacks to install multiple languages.
- Reduce disk usage of ${WRKDIR} with multiple languages.
- Don't create install set to ${WRKDIR} in post-build stage.
- Install desktop files to share/applications as symbolic links.
- Shut up tar warning.
- Add lang-all option.
- Add missing lang-* options (by, gd, gu, ms and my).
Diffstat (limited to 'misc/openoffice3')
-rw-r--r-- | misc/openoffice3/Makefile | 47 | ||||
-rw-r--r-- | misc/openoffice3/PLIST | 4 | ||||
-rw-r--r-- | misc/openoffice3/distinfo | 4 | ||||
-rw-r--r-- | misc/openoffice3/options.mk | 41 | ||||
-rw-r--r-- | misc/openoffice3/patches/patch-bq | 78 |
5 files changed, 129 insertions, 45 deletions
diff --git a/misc/openoffice3/Makefile b/misc/openoffice3/Makefile index 4c64b4c9b8e..a2800d3296d 100644 --- a/misc/openoffice3/Makefile +++ b/misc/openoffice3/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2008/10/24 19:41:28 hira Exp $ +# $NetBSD: Makefile,v 1.12 2008/10/25 15:18:17 hira Exp $ # OO_VER= 3.0.0 @@ -88,6 +88,8 @@ CONFIGURE_ARGS+= --enable-binfilter CONFIGURE_ARGS+= --enable-cairo CONFIGURE_ARGS+= --disable-systray CONFIGURE_ARGS+= --disable-ldap +CONFIGURE_ARGS+= --disable-odk +CONFIGURE_ARGS+= --disable-gcjaot CONFIGURE_ARGS+= --with-system-stdlibs CONFIGURE_ARGS+= --with-system-cairo CONFIGURE_ARGS+= --with-system-curl @@ -116,11 +118,7 @@ OO_EXTENSIONS+= presenter/presenter-screen.oxt # `portable' supports all platforms. CONFIGURE_ARGS+= --enable-epm --with-package-format=portable -# Disable odk, gcjaot. -CONFIGURE_ARGS+= --disable-odk --disable-gcjaot - -# NOTE: In this version, this value should be separated by space (comma -# causes build error). +# Language option. CONFIGURE_ARGS+= --with-lang=${OO_LANGS:Q} .include "options.mk" @@ -130,6 +128,7 @@ UNLIMIT_RESOURCES+= datasize OO_RELEASE= OpenOffice.org${OO_VER} PLIST_SRC+= ${PKGDIR}/PLIST PLIST_SRC+= ${WRKDIR}/PLIST +PLIST_SUBST+= OO_UNXNAME=${OO_UNXNAME} MESSAGE_SUBST+= DESTDIR=${DESTDIR} MESSAGE_SUBST+= OO_PREFIX=${OO_PREFIX} INSTALLATION_DIRS= bin lib/${OO_RELEASE} share/applications \ @@ -137,6 +136,7 @@ INSTALLATION_DIRS= bin lib/${OO_RELEASE} share/applications \ OO_UNXNAME= openoffice.org3 OO_PKGPATH= ${WRKSRC}/instsetoo_native/${OPENOFFICE_OUTPATH}.pro/OpenOffice/portable/install +OO_LANGPACKPATH=${WRKSRC}/instsetoo_native/${OPENOFFICE_OUTPATH}.pro/OpenOffice_languagepack/portable/install OO_PROGRAMS= scalc sdraw simpress soffice swriter unopkg OO_PREFIX= ${DESTDIR}${PREFIX}/lib/${OO_RELEASE} @@ -147,22 +147,10 @@ post-extract: cp -Rp gcc3_freebsd_x86-64 gcc3_netbsd_x86-64 do-build: - ${_ULIMIT_CMD} ${SETENV} ${MAKE_ENV} bash -c "cd ${WRKSRC} && ./bootstrap && source ${OPENOFFICE_SETFILE}Env.Set.sh && cd instsetoo_native && build.pl --checkmodules; build.pl -P${MAKE_JOBS:U1} --all product=full" + @${_ULIMIT_CMD} ${SETENV} ${MAKE_ENV} bash -c \ + "cd ${WRKSRC} && ./bootstrap && source ${OPENOFFICE_SETFILE}Env.Set.sh && cd instsetoo_native && build.pl --checkmodules && build.pl -P${MAKE_JOBS:U1} --all product=full && cd util && dmake ooolanguagepack" post-build: - cd ${WRKDIR} && \ - rm -fr opt && \ - for l in ${OO_LANGS}; do \ - for f in ${OO_PKGPATH:Q}/$${l}/*/*.sw; do \ - tar xpfk $$f; \ - done; \ - done - cd ${WRKDIR} && \ - rm -fr xdg && \ - mv opt/${OO_UNXNAME}/share/xdg . - cd ${WRKDIR}/opt/openoffice.org && \ - chmod ${SHAREMODE} basis3.0/program/hid.lst \ - basis3.0/program/testtoolrc ${ECHO} "#!${SH}" > ${WRKDIR}/${OO_UNXNAME} ${ECHO} "exec ${OO_PREFIX}/${OO_UNXNAME}/program/soffice \"\$$@\"" \ >> ${WRKDIR}/${OO_UNXNAME} @@ -171,15 +159,26 @@ post-build: >> ${WRKDIR}/${OO_UNXNAME}-printeradmin do-install: - cd ${WRKDIR}/opt && \ - tar cf - openoffice.org ${OO_UNXNAME} | tar Cxpf ${OO_PREFIX} - + cd ${OO_PREFIX} && \ + for f in ${OO_PKGPATH:Q}/${OO_BASELANG}/*/*.sw; do \ + tar xpf $$f; \ + done; \ + for lang in ${OO_LANGPACKS}; do \ + for f in ${OO_LANGPACKPATH:Q}/$$lang/*/*.sw; do \ + tar xpf $$f; \ + done; \ + done + for d in ${OO_PREFIX}/${OO_UNXNAME}/share/xdg/*; do \ + ln -s $$d ${DESTDIR}${PREFIX}/share/applications; \ + done + cd ${OO_PREFIX}/${OO_UNXNAME}/basis-link/program && \ + chmod ${SHAREMODE} hid.lst testtoolrc for f in ${OO_PROGRAMS}; do \ ln -sf ${OO_PREFIX}/${OO_UNXNAME}/program/$$f \ ${DESTDIR}${PREFIX}/bin/$$f; \ done cd ${WRKDIR}/${OO_TAG}/solver/300/${OPENOFFICE_OUTPATH}.pro/bin && \ ${INSTALL_DATA} ${OO_EXTENSIONS} ${OO_PREFIX}/extensions - ${INSTALL_DATA} ${WRKDIR}/xdg/* ${DESTDIR}${PREFIX}/share/applications ${INSTALL_SCRIPT} ${WRKDIR}/${OO_UNXNAME} ${DESTDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKDIR}/${OO_UNXNAME}-printeradmin \ ${DESTDIR}${PREFIX}/bin @@ -190,8 +189,6 @@ post-install: sort > ${WRKDIR}/PLIST && \ find lib/${OO_RELEASE} -type d -print | sort -r | \ awk '{print("@dirrm "$$1)}' >> ${WRKDIR}/PLIST - ${ECHO} bin/${OO_UNXNAME} >> ${WRKDIR}/PLIST - ${ECHO} bin/${OO_UNXNAME}-printeradmin >> ${WRKDIR}/PLIST # OS specific Makefile .if exists(Makefile.${OPSYS}) diff --git a/misc/openoffice3/PLIST b/misc/openoffice3/PLIST index c95ec030a7e..6269c5110bd 100644 --- a/misc/openoffice3/PLIST +++ b/misc/openoffice3/PLIST @@ -1,10 +1,12 @@ -@comment $NetBSD: PLIST,v 1.3 2008/10/18 01:35:25 hira Exp $ +@comment $NetBSD: PLIST,v 1.4 2008/10/25 15:18:17 hira Exp $ bin/scalc bin/sdraw bin/simpress bin/soffice bin/swriter bin/unopkg +bin/${OO_UNXNAME} +bin/${OO_UNXNAME}-printeradmin share/applications/base.desktop share/applications/calc.desktop share/applications/draw.desktop diff --git a/misc/openoffice3/distinfo b/misc/openoffice3/distinfo index f1e46e2fe45..98f1a3b2d99 100644 --- a/misc/openoffice3/distinfo +++ b/misc/openoffice3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.11 2008/10/24 11:35:28 hira Exp $ +$NetBSD: distinfo,v 1.12 2008/10/25 15:18:17 hira Exp $ SHA1 (openoffice-3.0.0/OOo_3.0.0_src_binfilter.tar.bz2) = 09ff91fd871f00c696befa8064fe04d7a88a3c8a RMD160 (openoffice-3.0.0/OOo_3.0.0_src_binfilter.tar.bz2) = edc71b8b0596d63e60431c7266140bf5188abc6d @@ -42,7 +42,7 @@ SHA1 (patch-bl) = 28beb128f19199a1a86965d2e2b6d42a2565224c SHA1 (patch-bm) = 0f7367782155c1d0f0459912aac69a1c759ad7fa SHA1 (patch-bn) = 6f21ecf499135b5b47ed191eca79848b4c404447 SHA1 (patch-bo) = 3e4bcccd0a7cea535e443d750039fa844380f8bc -SHA1 (patch-bq) = 5a78794aac28cefb9386034e6937c8f63b2ebc65 +SHA1 (patch-bq) = 7fc0395707e5735f35a1154bfe431cca50fad3f2 SHA1 (patch-bs) = ede4ffcb762e89efbf95b6e4b644eb268534f1ca SHA1 (patch-bv) = bc035bdbc8420666a52417f2226e3e687d199e33 SHA1 (patch-bw) = 223963fe59b71468420a697d8ea27c153b9f37ce diff --git a/misc/openoffice3/options.mk b/misc/openoffice3/options.mk index 4a46f7f2207..b7babb85b61 100644 --- a/misc/openoffice3/options.mk +++ b/misc/openoffice3/options.mk @@ -1,18 +1,19 @@ -# $NetBSD: options.mk,v 1.9 2008/10/24 11:35:28 hira Exp $ +# $NetBSD: options.mk,v 1.10 2008/10/25 15:18:17 hira Exp $ +# PKG_OPTIONS_VAR= PKG_OPTIONS.openoffice3 PKG_SUPPORTED_OPTIONS= cups gnome gtk2 java kde ooo-external-libwpd PKG_OPTIONS_OPTIONAL_GROUPS= browser PKG_OPTIONS_GROUP.browser= firefox firefox3 seamonkey # The list from completelangiso in solenv/inc/postset.mk. -OO_SUPPORTED_LANGUAGES= af ar as-IN be-BY bg br bn bn-BD bn-IN bs ca \ - cs cy da de dz el en-GB en-US en-ZA eo es et \ - eu fa fi fr ga gl gu-IN he hi-IN hr hu it ja \ - ka km kn ko ku lo lt lv mk ms ml-IN mr-IN ne \ - nb nl nn nr ns oc or-IN pa-IN pl pt pt-BR ru \ - rw sk sl sh sr ss st sv sw sw-TZ te-IN ti-ER \ - ta-IN th tn tr ts tg ur-IN uk uz ve vi xh \ - zh-CN zh-TW zu +OO_SUPPORTED_LANGUAGES= af ar as-IN be-BY bg br bn bn-BD bn-IN bs by \ + ca cs cy da de dz el en-GB en-US en-ZA eo es \ + et eu fa fi fr ga gd gl gu gu-IN he hi-IN hr \ + hu it ja ka km kn ko ku lo lt lv mk mn ms \ + ml-IN mr-IN my ne nb nl nn nr ns oc or-IN \ + pa-IN pl pt pt-BR ru rw sk sl sh sr ss st sv \ + sw sw-TZ te-IN ti-ER ta-IN th tn tr ts tg \ + ur-IN uk uz ve vi xh zh-CN zh-TW zu all .for l in ${OO_SUPPORTED_LANGUAGES} PKG_SUPPORTED_OPTIONS+= lang-${l} .endfor @@ -22,10 +23,26 @@ PKG_OPTIONS_LEGACY_OPTS+= gnome-vfs:gnome .include "../../mk/bsd.options.mk" .include "../../mk/bsd.prefs.mk" -.for l in ${PKG_OPTIONS:Mlang-*} -OO_LANGS+= ${l:S/^lang-//1} -.endfor +.if !empty(PKG_OPTIONS:Mlang-all) +OO_LANGS= ALL +OO_BASELANG= en-US +OO_LANGPACKS= ${OO_SUPPORTED_LANGUAGES:S/en-US//1:S/all//1} +.else +. for _l in ${PKG_OPTIONS:Mlang-*:S/lang-//g} +OO_LANGS+= ${_l} +OO_BASELANG?= ${_l} # Get first one. +. endfor +.endif OO_LANGS?= en-US +OO_BASELANG?= en-US +OO_LANGPACKS?= ${OO_LANGS:S/${OO_BASELANG}//1} + +SUBST_CLASSES+= instset +SUBST_STAGE.instset= post-patch +SUBST_MESSAGE.instset= Reduce OOo install sets. +SUBST_FILES.instset= instsetoo_native/util/makefile.mk +SUBST_SED.instset+= -e 's,@BASELANG@,${OO_BASELANG},g' +SUBST_SED.instset+= -e 's,@LANGPACKS@,${OO_LANGPACKS},g' .if !empty(PKG_OPTIONS:Mfirefox) MOZ_FLAVOUR= firefox diff --git a/misc/openoffice3/patches/patch-bq b/misc/openoffice3/patches/patch-bq index b3bd3216433..3b74f256379 100644 --- a/misc/openoffice3/patches/patch-bq +++ b/misc/openoffice3/patches/patch-bq @@ -1,18 +1,86 @@ -$NetBSD: patch-bq,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $ +$NetBSD: patch-bq,v 1.2 2008/10/25 15:18:17 hira Exp $ ---- instsetoo_native/util/makefile.mk.orig 2008-07-26 06:07:21.000000000 +0900 -+++ instsetoo_native/util/makefile.mk 2008-07-26 06:08:22.000000000 +0900 -@@ -54,6 +54,9 @@ +--- instsetoo_native/util/makefile.mk.orig 2008-07-30 22:30:16.000000000 +0900 ++++ instsetoo_native/util/makefile.mk 2008-10-26 06:58:43.000000000 +0900 +@@ -54,6 +54,12 @@ ENABLE_DOWNLOADSETS=TRUE .ENDIF # "$(FORCE_DOWNLOADSETS)"!="" +# Don't create download set with pkgsrc. +ENABLE_DOWNLOADSETS= + ++BASELANG= @BASELANG@ ++LANGPACKS= @LANGPACKS@ ++ .EXPORT: ENABLE_DOWNLOADSETS .EXPORT: LAST_MINOR .EXPORT: PRJ -@@ -383,10 +386,10 @@ +@@ -135,13 +141,13 @@ + + .IF "$(alllangiso)"!="" + +-openoffice: $(foreach,i,$(alllangiso) openoffice_$i) ++openoffice: openoffice_$(BASELANG) + + openofficedev: $(foreach,i,$(alllangiso) openofficedev_$i) + + openofficewithjre: $(foreach,i,$(alllangiso) openofficewithjre_$i) + +-ooolanguagepack : $(foreach,i,$(alllangiso) ooolanguagepack_$i) ++ooolanguagepack : $(foreach,i,$(LANGPACKS) ooolanguagepack_$i) + + ooodevlanguagepack: $(foreach,i,$(alllangiso) ooodevlanguagepack_$i) + +@@ -183,13 +189,13 @@ + ADDDEPS+=hack_msitemplates + .ENDIF + +-$(foreach,i,$(alllangiso) openoffice_$i) : $(ADDDEPS) ++openoffice_$(BASELANG) : $(ADDDEPS) + + $(foreach,i,$(alllangiso) openofficedev_$i) : $(ADDDEPS) + + $(foreach,i,$(alllangiso) openofficewithjre_$i) : $(ADDDEPS) + +-$(foreach,i,$(alllangiso) ooolanguagepack_$i) : $(ADDDEPS) ++$(foreach,i,$(LANGPACKS) ooolanguagepack_$i) : $(ADDDEPS) + + $(foreach,i,$(alllangiso) ooodevlanguagepack_$i) : $(ADDDEPS) + +@@ -217,7 +223,7 @@ + .ENDIF # "$(OS)" == "MACOSX" + + .IF "$(PKGFORMAT)"!="" +-$(foreach,i,$(alllangiso) openoffice_$i) : $$@{$(PKGFORMAT:^".")} ++openoffice_$(BASELANG) : $$@{$(PKGFORMAT:^".")} + .IF "$(MAKETARGETS)"!="" && "$(PKGFORMAT)"!="" + .IF "$(MAKETARGETS:e)"=="" && "$(MAKETARGETS:s/_//)"!="$(MAKETARGETS)" + $(MAKETARGETS) : $$@{$(PKGFORMAT:^".")} +@@ -228,7 +234,7 @@ + .ELSE # "$(PKGFORMAT)"!="" + openoffice_% : + .ENDIF # "$(PKGFORMAT)"!="" +- $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles $(subst,xxx,$(@:e:s/.//) $(PKGFORMATSWITCH) $(VERBOSESWITCH)) ++ $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -i . -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles $(subst,xxx,$(@:e:s/.//) $(PKGFORMATSWITCH) $(VERBOSESWITCH)) + $(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml > $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml + + .IF "$(PKGFORMAT)"!="" +@@ -249,12 +255,12 @@ + $(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice_Dev --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml > $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml + + .IF "$(PKGFORMAT)"!="" +-$(foreach,i,$(alllangiso) ooolanguagepack_$i) : $$@{$(PKGFORMAT:^".")} ++$(foreach,i,$(LANGPACKS) ooolanguagepack_$i) : $$@{$(PKGFORMAT:^".")} + ooolanguagepack_%{$(PKGFORMAT:^".")} : + .ELSE # "$(PKGFORMAT)"!="" + ooolanguagepack_% : + .ENDIF # "$(PKGFORMAT)"!="" +- $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -languagepack $(subst,xxx,$(@:e:s/.//) $(PKGFORMATSWITCH) $(VERBOSESWITCH)) ++ $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -i . -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -languagepack $(subst,xxx,$(@:e:s/.//) $(PKGFORMATSWITCH) $(VERBOSESWITCH)) + + .IF "$(PKGFORMAT)"!="" + $(foreach,i,$(alllangiso) ooodevlanguagepack_$i) : $$@{$(PKGFORMAT:^".")} +@@ -380,10 +386,10 @@ -$(MKDIRHIER) $(MSIURETEMPLATEDIR) -$(MKDIRHIER) $(MSISDKOOTEMPLATEDIR) # -$(MKDIRHIER) $(MSIURETEMPLATEDIR) |