NetBSD support

This commit is contained in:
kytv
2011-09-18 16:56:10 +00:00
parent 2461b9525c
commit 2261039a76
2 changed files with 16 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
#/bin/bash
#!/usr/bin/env bash
#FIXME What platforms for MacOS?
MISC_DARWIN_PLATFORMS=""
@@ -19,6 +19,7 @@ MISC_LINUX_PLATFORMS="hppa2.0 alphaev56 armv5tel mips64el itanium itanium2 ultra
# Do NOT add any X86 platforms, do that below in the x86 platform list.
#
MISC_FREEBSD_PLATFORMS="alphaev56 ultrasparc2i"
MISC_NETBSD_PLATFORMS="powerpc powerpc64 powerpc64le powerpcle m68k-atari amiga m68knommu"
#
# MINGW/Windows??
@@ -43,6 +44,7 @@ X86_PLATFORMS="pentium pentiummmx pentium2 pentium3 pentiumm k6 k62 k63 athlon g
MINGW_PLATFORMS="${X86_PLATFORMS} ${MISC_MINGW_PLATFORMS}"
LINUX_PLATFORMS="${X86_PLATFORMS} ${MISC_LINUX_PLATFORMS}"
FREEBSD_PLATFORMS="${X86_PLATFORMS} ${MISC_FREEBSD_PLATFORMS}"
NETBSD_PLATFORMS="${FREEBSD_PLATFORMS} ${LINUX_PLATFORMS} ${MISC_NETBSD_PLATFORMS}"
DARWIN_PLATFORMS="core2 corei"
# Set the version to 5.0.2 for OSX because
@@ -54,7 +56,7 @@ else
VER=$(echo gmp-*.tar.bz2 | sed -re "s/(.*-)(.*)(.*.tar.bz2)$/\2/" | tail -n 1)
fi
if [ "$VER" == "" ] ; then
if [ "$VER" = "" ] ; then
echo "ERROR! Can't find gmp source tarball."
exit 1
fi
@@ -97,6 +99,12 @@ Linux*)
PLATFORM_LIST="${LINUX_PLATFORMS}";;
esac
echo "Building ${TARGET} .so's for ${arch}";;
NetBSD*)
PLATFORM_LIST="${NETBSD_PLATFORMS}"
NAME="libjbigi"
TYPE="so"
TARGET="-netbsd-"
echo "Building netbsd .sos for all architectures";;
FreeBSD*)
PLATFORM_LIST="${FREEBSD_PLATFORMS}"
NAME="libjbigi"
@@ -150,7 +158,7 @@ function build_file {
}
echo "Extracting GMP Version $VER ..."
tar -xf gmp-$VER.tar.bz2 || ( echo "Error in tarball file!" ; exit 1 )
tar -xjf gmp-$VER.tar.bz2 || ( echo "Error in tarball file!" ; exit 1 )
if [ ! -d bin ]; then
mkdir bin

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# When executed in Mingw: Produces a jbigi.dll
# When executed in Linux/FreeBSD: Produces a libjbigi.so
# When executed in OSX: Produces a libjbigi.jnilib