summaryrefslogtreecommitdiffstats
path: root/exlibs
diff options
context:
space:
mode:
authorQuentin Glidic2018-09-15 16:05:08 +0200
committerQuentin Glidic2018-10-23 16:42:34 +0200
commit6e2232a35729d49c0526fba3b5291e83f15c079c (patch)
treea435428831a04b358bd7ddd443acc012849209b4 /exlibs
parentb3a602e28cf94f86f06efb14ffbb373a73ad22a0 (diff)
downloadsardemff7-pending-6e2232a35729d49c0526fba3b5291e83f15c079c.tar.xz
mozilla-app: Use mach
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'exlibs')
-rw-r--r--exlibs/mozilla-app.exlib110
1 files changed, 46 insertions, 64 deletions
diff --git a/exlibs/mozilla-app.exlib b/exlibs/mozilla-app.exlib
index 9a3a568..c2ddf9e 100644
--- a/exlibs/mozilla-app.exlib
+++ b/exlibs/mozilla-app.exlib
@@ -18,11 +18,10 @@ if ever is_scm; then
MOZ_HG_MODULE_COMM=${MOZ_HG_MODULE_XULRUNNER/mozilla/comm}
MOZ_HG_MODULE_LDAP_SDKS=projects/ldap-sdks
- SCM_CHECKOUT_TO=moz_xulrunner
- SCM_UNPACK_TO="${WORKBASE}"/moz_xulrunner
SCM_REPOSITORY="https://github.com/mozilla/gecko-dev"
-
+ SCM_CHECKOUT_TO=moz_gecko
SCM_moz_comm_REPOSITORY="https://github.com/mozilla/releases-comm-central"
+ SCM_moz_comm_UNPACK_TO=${WORK}/comm
SCM_moz_ldap_sdks_REPOSITORY=${MOZ_HG_BASE_URI}/${MOZ_HG_MODULE_LDAP_SDKS}
SCM_moz_ldap_sdks_TYPE=hg
@@ -103,19 +102,16 @@ DEPENDENCIES="
x11-libs/libnotify [[ description = [ Provide system integrated notification ] ]]
"
-WORK="${WORKBASE}"/build
-
# Needed for comm
# Should be fixed upstream
-DEFAULT_SRC_COMPILE_PARAMS=(
- MKDIR=mkdir
- TOOLCHAIN_PREFIX=$(exhost --tool-prefix)
- RANLIB=$(exhost --tool-prefix)ranlib
-)
+#DEFAULT_SRC_COMPILE_PARAMS=(
+# MKDIR=mkdir
+# RANLIB=$(exhost --tool-prefix)ranlib
+#)
mozilla-app_pkg_setup() {
if option bindist; then
- if [[ -d "${ECONF_SOURCE}"/${MOZ_APPLICATION}/branding/unofficial ]]; then
+ if [[ -d ${MOZ_APPLICATION}/branding/unofficial ]]; then
MOZ_BRANDING=${MOZ_APPLICATION}/branding/unofficial
else
MOZ_BRANDING=${MOZ_APPLICATION}/branding/nightly
@@ -124,8 +120,8 @@ mozilla-app_pkg_setup() {
MOZ_BRANDING=${MOZ_APPLICATION}/branding/nightly
else
case ${MOZ_APPLICATION} in
- mail)
- MOZ_BRANDING=other-licences/branding/${PN}
+ comm/mail)
+ MOZ_BRANDING=${MOZ_APPLICATION}/branding/${PN}
;;
*)
MOZ_BRANDING=${MOZ_APPLICATION}/branding/official
@@ -136,23 +132,7 @@ mozilla-app_pkg_setup() {
}
if ever is_scm; then
- export_exlib_phases src_unpack src_prepare
-
- if exparam -b comm; then
- ECONF_SOURCE="${WORKBASE}"/moz_comm
- else
- ECONF_SOURCE="${WORKBASE}"/moz_xulrunner
- fi
-
- mozilla-app_src_unpack() {
- scm_src_unpack
- edo mkdir "${WORK}"
-
- if exparam -b comm; then
- edo mv "${WORKBASE}"/moz_xulrunner "${WORKBASE}"/moz_comm/mozilla
- #edo mv "${WORKBASE}"/moz_ldap_sdks "${WORKBASE}"/moz_comm/ldap/sdks
- fi
- }
+ export_exlib_phases src_prepare
mozilla-scm_patch_baseconfig() {
# Exherbo install dirs
@@ -165,23 +145,14 @@ if ever is_scm; then
}
mozilla-app_src_prepare() {
- edo pushd "${ECONF_SOURCE}"
-
default
if exparam -b comm; then
- mozilla-scm_patch_baseconfig
-
- eautoconf
-
if option !gtk2-plugin-support; then
edo sed -i \
-e '\|/gtk2/|d' \
- mail/installer/package-manifest.in
+ comm/mail/installer/package-manifest.in
fi
-
- edo popd
- edo pushd "${ECONF_SOURCE}"/mozilla
fi
if option !gtk2-plugin-support; then
@@ -250,18 +221,10 @@ if ever is_scm; then
eautoconf
edo popd
- edo popd
}
fi
mozilla-app_src_configure() {
- # Prevent the build system to use any default configuration
- edo touch "${ECONF_SOURCE}"/.mozconfig
-
- export PKG_SKIP_STRIP=1
- export CROSS_COMPILE=1
- export MOZ_TELEMETRY_REPORTING=1
-
# Optimization CFLAG
local x opt=-O2 debug=disable
# Set optimization level based on CFLAGS
@@ -283,7 +246,15 @@ mozilla-app_src_configure() {
# Fix for widevine gmp loading
append-flags "-Wl,-rpath=/usr/$(exhost --target)/lib/${PN}"
- local econf_params=(
+ local mozconfig_params=(
+ PKG_SKIP_STRIP=1
+ CROSS_COMPILE=1
+ MOZ_TELEMETRY_REPORTING=1
+ TOOLCHAIN_PREFIX=$(exhost --tool-prefix)
+ MOZ_CO_PROJECT=${MOZ_APPLICATION}
+ MOZ_MAKE_FLAGS=-j${EXJOBS:-1}
+ MOZ_OBJDIR="${WORKBASE}"/build
+
--prefix=/usr/$(exhost --target)
--host=$(exhost --build)
--target=$(exhost --target)
@@ -295,6 +266,7 @@ mozilla-app_src_configure() {
--disable-warnings-as-errors
# We don’t want debug
+ --enable-release
--${debug}-debug
--${debug}-debug-symbols
--disable-tests
@@ -345,44 +317,54 @@ mozilla-app_src_configure() {
# ${MOZ_APPLICATION}/confvars.sh
if exparam -b comm; then
- econf_params+=(
+ mozconfig_params+=(
$(option_enable lightning calendar)
)
fi
- edo "${ECONF_SOURCE}"/configure \
- ${econf_params[@]} \
- "$@"
+ local x
+ edo tee .mozconfig <<EOF
+ $(for x in "${mozconfig_params[@]}" "${@}"; do
+ case "${x}" in
+ --*)
+ echo ac_add_options "${x}"
+ ;;
+ *)
+ echo export "${x}"
+ echo mk_add_options "${x}"
+ ;;
+ esac
+ done)
+EOF
+
+ unset AS
+
+ edo ./mach configure
}
mozilla-app_src_compile() {
unset TARGETS
- default
+ edo ./mach build -j${EXJOBS:-1}
}
mozilla-app_src_install() {
unset TARGETS
+ edo cd "${WORKBASE}"/build
+
default
find "${IMAGE}" -type d -empty -printf "rmdir %P\n" -delete 1>&2
- local branding_path="${ECONF_SOURCE}"/${MOZ_BRANDING} icon iconsname name size
-
- iconsname=default
- case "${MOZ_APPLICATION}" in
- mail)
- iconsname=mailicon
- ;;
- esac
+ local branding_path=${WORK}/${MOZ_BRANDING} icon name size
source "${branding_path}"/configure.sh
targeticonname="${MOZ_APP_DISPLAYNAME,,}"
# Install icons
for size in 16 22 24 32 48 64 72 96 128 256; do
- for name in ${iconsname}${size}.png mozicon${size}.png content/icon${size}.png; do
+ for name in default${size}.png mozicon${size}.png content/icon${size}.png; do
local path=${branding_path}/${name}
if [[ -f "${path}" ]]; then
insinto /usr/share/icons/hicolor/${size}x${size}/apps
@@ -410,7 +392,7 @@ mozilla-app_src_install() {
# Plugins dir
hereenvd 50${PN} <<EOF
-MOZ_PLUGIN_PATH="/usr/$(exhost --target)/lib/mozilla/plugins:/usr/$(exhost --target)/lib/nsbrowser/plugins:/opt/nsbrowser/plugins:/opt/netscape/plugins"
+MOZ_PLUGIN_PATH="/usr/host/lib/mozilla/plugins:/usr/host/lib/nsbrowser/plugins:/opt/nsbrowser/plugins:/opt/netscape/plugins"
COLON_SEPARATED="MOZ_PLUGIN_PATH"
EOF