source: npl/java/openjdk/fix_seamonkey_pkgconfig.sh

Last change on this file was 981dbbc, checked in by Edwin Eefting <edwin@datux.nl>, 7 years ago

build openjdk, not used yet

  • Property mode set to 100644
File size: 1.6 KB
Line 
1#!/bin/bash
2
3# ---------------------------------------------------------------------------
4# This script fixes the seamonkye-plugin.pc file and adds libxul.pc.
5# These changes enable the compilation of OpenJDK and its browser plugin.
6# It will probably also be beneficial to the compilation of browser plugins
7# in general.
8#
9# Author: Eric Hameleers <alien@slackware.com> December 2011
10# ---------------------------------------------------------------------------
11
12# Automatically determine the architecture we're building on:
13if [ -z "$ARCH" ]; then
14  case "$( uname -m )" in
15    i?86) export ARCH=i486 ;;
16    arm*) export ARCH=arm ;;
17    # Unless $ARCH is already set, use uname -m for all other archs:
18       *) export ARCH=$( uname -m ) ;;
19  esac
20fi
21
22if [ "$ARCH" = "x86_64" ]; then
23  LIBDIRSUFFIX="64"
24else
25  LIBDIRSUFFIX=""
26fi
27
28# Fix the seamonkey-plugin.pc file:
29sed -i -e '/^Cflags: /s, -I${includedir}/java -I${includedir}/plugin, -I${includedir} -DXP_UNIX,' /usr/lib${LIBDIRSUFFIX}/pkgconfig/seamonkey-plugin.pc
30
31# Add a libxul.pc file if needed:
32if [ ! -f /usr/lib${LIBDIRSUFFIX}/pkgconfig/libxul.pc ]; then
33  SEAMONKEY=$(echo /usr/lib${LIBDIRSUFFIX}/seamonkey-* | tail -1 | cut -f2 -d-)
34  cat <<EOT > /usr/lib${LIBDIRSUFFIX}/pkgconfig/libxul.pc
35prefix=/usr
36libdir=/usr/lib${LIBDIRSUFFIX}/seamonkey-$SEAMONKEY
37includedir=/usr/include/seamonkey-$SEAMONKEY
38idldir=/usr/share/idl/seamonkey-$SEAMONKEY
39
40Name: libxul
41Description: The Mozilla Runtime and Embedding Engine
42Version: $SEAMONKEY
43Requires: seamonkey-nspr >= 4.7.1
44Libs: -L\${libdir} -lxul -lxpcom
45Cflags: -I\${includedir} -fshort-wchar
46EOT
47fi
48
Note: See TracBrowser for help on using the repository browser.