diff options
author | Niels Horn <niels.horn@gmail.com> | 2010-05-14 21:57:22 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-16 22:24:36 -0500 |
commit | b8cef6490b5acd50943353f16e4d4ee1b104abeb (patch) | |
tree | 0a36b4323bebf88fee9bc04c7140fef65d26462f | |
parent | e59f0b31012c73d3124c3c9668554c5eaf98e03f (diff) |
graphics/brlcad: Added (open source solid modeling system).
-rw-r--r-- | graphics/brlcad/README | 8 | ||||
-rw-r--r-- | graphics/brlcad/README.SLACKWARE | 18 | ||||
-rw-r--r-- | graphics/brlcad/brlcad.SlackBuild | 108 | ||||
-rw-r--r-- | graphics/brlcad/brlcad.desktop | 10 | ||||
-rw-r--r-- | graphics/brlcad/brlcad.info | 10 | ||||
-rw-r--r-- | graphics/brlcad/brlcad.png | bin | 0 -> 28164 bytes | |||
-rw-r--r-- | graphics/brlcad/doinst.sh | 4 | ||||
-rw-r--r-- | graphics/brlcad/patches/gcc433.patch | 10 | ||||
-rw-r--r-- | graphics/brlcad/patches/libpng14x.patch | 98 | ||||
-rw-r--r-- | graphics/brlcad/profile.d/brlcad.csh | 4 | ||||
-rw-r--r-- | graphics/brlcad/profile.d/brlcad.sh | 4 | ||||
-rw-r--r-- | graphics/brlcad/slack-desc | 19 |
12 files changed, 293 insertions, 0 deletions
diff --git a/graphics/brlcad/README b/graphics/brlcad/README new file mode 100644 index 0000000000000..a02fe5c4c7727 --- /dev/null +++ b/graphics/brlcad/README @@ -0,0 +1,8 @@ +BRL-CAD is a powerful cross-platform open source solid modeling system that +includes interactive geometry editing, high-performance ray-tracing for +rendering and geometric analysis, image and signal-processing tools, a +system performance analysis benchmark suite, libraries for robust geometric +representation, with more than 20 years of active development. + +NOTE: This package needs about 3.1GB of space to build, so adapt your OUTPUT / +TMP variables if necessary. diff --git a/graphics/brlcad/README.SLACKWARE b/graphics/brlcad/README.SLACKWARE new file mode 100644 index 0000000000000..bc1b680c96b6b --- /dev/null +++ b/graphics/brlcad/README.SLACKWARE @@ -0,0 +1,18 @@ +README.SLACKWARE +================ + +Some post-installation tips: + +1) PATH environment variable + +As the binaries of BRL-CAD are installed in /opt/brlcad/bin, you will need to +log out & log in after installing the package, as the script that sets the +PATH variable (/etc/profile.d/brlcad.{c,}sh) is only started when logging in. + +2) man pages + +To read the brlcad man-pages, use "brlman <subject>" from the command line. +This was necessary, as some of BRL-CAD's man-pages conflict with standard man- +pages. Example: "man kill" explains how to kill a process, while "brlman kill" +explains how to remove an object from a model. + diff --git a/graphics/brlcad/brlcad.SlackBuild b/graphics/brlcad/brlcad.SlackBuild new file mode 100644 index 0000000000000..782d595a2d606 --- /dev/null +++ b/graphics/brlcad/brlcad.SlackBuild @@ -0,0 +1,108 @@ +#!/bin/sh + +# Slackware build script for BRL-CAD + +# Originally written by Nikolai Saika <nicksaika@gmail.com> +# Released under the WTFPL - http://sam.zoy.org/wtfpl/ + +# Maintained as of version 7.16.6 by Niels Horn <niels.horn@gmail.com> +# Revision date: 2010/05/02 + +# TODO: Investigate adding pkgconfig path in profile scripts -RW + +PRGNAM=brlcad +VERSION=${VERSION:-7.16.6} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Patch to resolve a bug in gcc 4.3.3 (as in Slackware 13.0) +# Not needed for gcc 4.4.x (but it won't harm) +patch -p1 < $CWD/patches/gcc433.patch + +# Patch for libpng 1.4.x (as in Slackware -current as of 2010/03/01) +# Do not use in 13.0 stable versions (won't work). +# Newer svn snapshots of brlcad won't need this any longer, but the stable +# 7.16.6 version still does. +#patch -p1 < $CWD/patches/libpng14x.patch + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/opt/$PRGNAM \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-ogl \ + --with-tcl=/usr/lib${LIBDIRSUFFIX} \ + --with-tk=/usr/lib${LIBDIRSUFFIX} \ + --disable-tcl-build \ + --disable-tk-build \ + --disable-tkhtml3-build \ + --disable-jove-build \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +( cd $PKG/opt/$PRGNAM/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/etc/profile.d/ +cat $CWD/profile.d/$PRGNAM.sh > $PKG/etc/profile.d/$PRGNAM.sh +cat $CWD/profile.d/$PRGNAM.csh > $PKG/etc/profile.d/$PRGNAM.csh +chmod 0755 $PKG/etc/profile.d/* + +# Copy icon & desktop file to package +mkdir -p $PKG/usr/share/{applications,pixmaps} +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop +cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE +( cd $PKG/usr/doc/$PRGNAM-$VERSION + ln -s ../../../opt/$PRGNAM/share/$PRGNAM/$VERSION/doc doc +) + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/graphics/brlcad/brlcad.desktop b/graphics/brlcad/brlcad.desktop new file mode 100644 index 0000000000000..4ada7307423e8 --- /dev/null +++ b/graphics/brlcad/brlcad.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=BRL-CAD +Comment=Constructive Solid Geometry modeling system +Categories=Graphics; +Exec=xterm -iconic -e /opt/brlcad/bin/mged +Icon=brlcad +StartupNotify=false + diff --git a/graphics/brlcad/brlcad.info b/graphics/brlcad/brlcad.info new file mode 100644 index 0000000000000..b805b15858227 --- /dev/null +++ b/graphics/brlcad/brlcad.info @@ -0,0 +1,10 @@ +PRGNAM="brlcad" +VERSION="7.16.6" +HOMEPAGE="http://brlcad.org" +DOWNLOAD="http://downloads.sourceforge.net/brlcad/brlcad-7.16.6.tar.bz2" +MD5SUM="1a1313435e37b00da521bfb4425cb274" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Niels Horn" +EMAIL="niels.horn@gmail.com" +APPROVED="rworkman" diff --git a/graphics/brlcad/brlcad.png b/graphics/brlcad/brlcad.png Binary files differnew file mode 100644 index 0000000000000..a32f237e90052 --- /dev/null +++ b/graphics/brlcad/brlcad.png diff --git a/graphics/brlcad/doinst.sh b/graphics/brlcad/doinst.sh new file mode 100644 index 0000000000000..4e8ba7071dea7 --- /dev/null +++ b/graphics/brlcad/doinst.sh @@ -0,0 +1,4 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + diff --git a/graphics/brlcad/patches/gcc433.patch b/graphics/brlcad/patches/gcc433.patch new file mode 100644 index 0000000000000..853fd97e5e2fe --- /dev/null +++ b/graphics/brlcad/patches/gcc433.patch @@ -0,0 +1,10 @@ +--- brlcad-7.16.6/src/other/openNURBS/opennurbs_system.h 2010-01-19 00:27:03.000000000 -0200 ++++ brlcad-7.16.6_patches/src/other/openNURBS/opennurbs_system.h 2010-04-28 22:58:03.712951143 -0300 +@@ -194,6 +194,7 @@ + extern "C" { + #endif + ++#include <stddef.h> + #include <stdlib.h> + #include <memory.h> + #include <string.h> diff --git a/graphics/brlcad/patches/libpng14x.patch b/graphics/brlcad/patches/libpng14x.patch new file mode 100644 index 0000000000000..7ab4e4d70359a --- /dev/null +++ b/graphics/brlcad/patches/libpng14x.patch @@ -0,0 +1,98 @@ +--- brlcad-7.16.6/src/other/tkimg/pngtcl/pngtclDecls.h 2010-01-19 00:27:35.000000000 -0200 ++++ brlcad-7.16.6_patched/src/other/tkimg/pngtcl/pngtclDecls.h 2010-04-23 17:58:07.000000000 -0300 +@@ -46,11 +46,11 @@ + png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn)); + /* 6 */ +-EXTERN png_uint_32 png_get_compression_buffer_size _ANSI_ARGS_(( ++EXTERN png_size_t png_get_compression_buffer_size _ANSI_ARGS_(( + png_structp png_ptr)); + /* 7 */ + EXTERN void png_set_compression_buffer_size _ANSI_ARGS_(( +- png_structp png_ptr, png_uint_32 size)); ++ png_structp png_ptr, png_size_t size)); + /* 8 */ + EXTERN int png_reset_zstream _ANSI_ARGS_((png_structp png_ptr)); + /* 9 */ +@@ -337,7 +337,7 @@ + png_bytep new_row)); + /* 94 */ + EXTERN png_voidp png_malloc _ANSI_ARGS_((png_structp png_ptr, +- png_uint_32 size)); ++ png_size_t size)); + /* 95 */ + EXTERN void png_free _ANSI_ARGS_((png_structp png_ptr, + png_voidp ptr)); +@@ -351,7 +351,7 @@ + png_uint_32 mask)); + /* 98 */ + EXTERN png_voidp png_malloc_default _ANSI_ARGS_((png_structp png_ptr, +- png_uint_32 size)); ++ png_size_t size)); + /* 99 */ + EXTERN void png_free_default _ANSI_ARGS_((png_structp png_ptr, + png_voidp ptr)); +@@ -380,7 +380,7 @@ + EXTERN png_uint_32 png_get_valid _ANSI_ARGS_((png_structp png_ptr, + png_infop info_ptr, png_uint_32 flag)); + /* 108 */ +-EXTERN png_uint_32 png_get_rowbytes _ANSI_ARGS_((png_structp png_ptr, ++EXTERN png_size_t png_get_rowbytes _ANSI_ARGS_((png_structp png_ptr, + png_infop info_ptr)); + /* 109 */ + EXTERN png_bytepp png_get_rows _ANSI_ARGS_((png_structp png_ptr, +--- brlcad-7.16.6/src/fb/png-fb.c 2010-01-19 00:29:40.000000000 -0200 ++++ brlcad-7.16.6_patched/src/fb/png-fb.c 2010-04-23 18:28:14.000000000 -0300 +@@ -189,7 +189,7 @@ + bu_exit(EXIT_FAILURE, "ERROR: Failed while reading file header!!!\n" ); + } + +- if (!png_check_sig((png_bytep)header, 8)) { ++ if (png_sig_cmp((png_bytep)header, 0, 8)) { + bu_exit(EXIT_FAILURE, "This is not a PNG file!!!\n" ); + } + +--- brlcad-7.16.6/src/util/png-bw.c 2010-01-19 00:33:04.000000000 -0200 ++++ brlcad-7.16.6_patched/src/util/png-bw.c 2010-04-23 19:08:46.000000000 -0300 +@@ -139,7 +139,7 @@ + if ( fread( header, 8, 1, fp_in ) != 1 ) + bu_exit( EXIT_FAILURE, "ERROR: Failed while reading file header!!!\n" ); + +- if ( !png_check_sig( (png_bytep)header, 8 ) ) ++ if ( png_sig_cmp((png_bytep)header, 0, 8)) + bu_exit( EXIT_FAILURE, "This is not a PNG file!!!\n" ); + + png_p = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL ); +--- brlcad-7.16.6/src/util/png-pix.c 2010-01-19 00:33:02.000000000 -0200 ++++ brlcad-7.16.6_patched/src/util/png-pix.c 2010-04-23 19:10:30.000000000 -0300 +@@ -95,7 +95,7 @@ + if ( fread( header, 8, 1, fp_in ) != 1 ) + bu_exit( EXIT_FAILURE, "ERROR: Failed while reading file header!!!\n" ); + +- if ( !png_check_sig( (png_bytep)header, 8 ) ) ++ if (png_sig_cmp( (png_bytep)header, 0, 8)) + bu_exit( EXIT_FAILURE, "This is not a PNG file!!!\n" ); + + png_p = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL ); +--- brlcad-7.16.6/src/util/png_info.c 2010-01-19 00:33:05.000000000 -0200 ++++ brlcad-7.16.6_patched/src/util/png_info.c 2010-04-23 19:12:00.000000000 -0300 +@@ -76,7 +76,7 @@ + if ( fread( header, 8, 1, fp_in ) != 1 ) + bu_exit( EXIT_FAILURE, "ERROR: Failed while reading file header!!!\n" ); + +- if ( !png_check_sig( (png_bytep)header, 8 ) ) ++ if (png_sig_cmp((png_bytep)header, 0, 8)) + bu_exit( EXIT_FAILURE, "This is not a PNG file!!!\n" ); + + png_p = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL ); +--- brlcad-7.16.6/src/canon/png-ipu.c 2010-01-19 00:30:24.000000000 -0200 ++++ brlcad-7.16.6_patched/src/canon/png-ipu.c 2010-04-23 19:13:10.000000000 -0300 +@@ -125,7 +125,7 @@ + if ( fread( header, 8, 1, stdin ) != 1 ) + bu_exit(1, "png-ipu: ERROR: Failed while reading file header!"); + +- if ( !png_check_sig( (png_bytep)header, 8 ) ) ++ if (png_sig_cmp((png_bytep)header, 0, 8)) + bu_exit(2, "png-ipu: This is not a valid PNG file\n"); + + png_p = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL ); diff --git a/graphics/brlcad/profile.d/brlcad.csh b/graphics/brlcad/profile.d/brlcad.csh new file mode 100644 index 0000000000000..fd94ce573aef8 --- /dev/null +++ b/graphics/brlcad/profile.d/brlcad.csh @@ -0,0 +1,4 @@ +#!/bin/csh +# Add path for brlcad: +setenv PATH ${PATH}:/opt/brlcad/bin + diff --git a/graphics/brlcad/profile.d/brlcad.sh b/graphics/brlcad/profile.d/brlcad.sh new file mode 100644 index 0000000000000..080b4cf149a3b --- /dev/null +++ b/graphics/brlcad/profile.d/brlcad.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# Add PATH for brlcad: +export PATH="$PATH:/opt/brlcad/bin" + diff --git a/graphics/brlcad/slack-desc b/graphics/brlcad/slack-desc new file mode 100644 index 0000000000000..278c90a1b3c91 --- /dev/null +++ b/graphics/brlcad/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +brlcad: BRL-CAD (Open-source solid modeling system) +brlcad: +brlcad: BRL-CAD is a powerful cross-platform open source solid modeling +brlcad: system that includes interactive geometry editing, high-performance +brlcad: ray-tracing for rendering and geometric analysis, image and signal- +brlcad: processing tools, a system performance analysis benchmark suite, +brlcad: libraries for robust geometric representation, with more than 20 +brlcad: years of active development. +brlcad: +brlcad: http://brlcad.org/ +brlcad: |