summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/k3d/README11
-rw-r--r--graphics/k3d/doinst.sh4
-rw-r--r--graphics/k3d/k3d.SlackBuild103
-rw-r--r--graphics/k3d/k3d.desktop11
-rw-r--r--graphics/k3d/k3d.info10
-rw-r--r--graphics/k3d/png14.patch53
-rw-r--r--graphics/k3d/slack-desc19
7 files changed, 211 insertions, 0 deletions
diff --git a/graphics/k3d/README b/graphics/k3d/README
new file mode 100644
index 0000000000..9f90faf377
--- /dev/null
+++ b/graphics/k3d/README
@@ -0,0 +1,11 @@
+K-3D is free-as-in-freedom 3D modeling and animation software. It features a
+plugin-oriented procedural engine for all of its content, making K-3D a very
+versatile and powerful package.
+
+K-3D excels at polygonal modeling, and includes basic tools for NURBS,
+patches, curves and animation.
+
+This requires gtkglext, libsigc++, glibmm, cairomm, pangomm and gtkmm
+(building / installing in this order should work fine)
+
+Optional packages: graphviz, gtksourceview, libgnome and OpenCASCADE.
diff --git a/graphics/k3d/doinst.sh b/graphics/k3d/doinst.sh
new file mode 100644
index 0000000000..4e8ba7071d
--- /dev/null
+++ b/graphics/k3d/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/k3d/k3d.SlackBuild b/graphics/k3d/k3d.SlackBuild
new file mode 100644
index 0000000000..be388e9265
--- /dev/null
+++ b/graphics/k3d/k3d.SlackBuild
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+# Slackware build script for k3d
+# 3D modeling and animation software
+
+# Written by Niels Horn <niels.horn@gmail.com>
+# (based on a script by Larry Hajali)
+# Revision date: 2010/07/14
+
+PRGNAM=k3d
+VERSION=${VERSION:-0.8.0.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+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"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-source-$VERSION
+tar xvf $CWD/$PRGNAM-source-$VERSION.tar.bz2
+cd $PRGNAM-source-$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 code for new libpng
+patch -p1 < $CWD/png14.patch
+
+# Fix man install directory.
+sed -i "s|share/man|man|" man/CMakeLists.txt
+
+# Fix location of libraries for 64-bits
+sed -i "s|SET(K3D_LIBDIR lib)|SET(K3D_LIBDIR lib${LIBDIRSUFFIX})|" CMakeLists.txt
+
+mkdir k3d-build
+cd k3d-build
+ cmake -G "Unix Makefiles" \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DK3D_BUILD_SVG_IO_MODULE=ON \
+ -DK3D_BUILD_CGAL_MODULE=OFF \
+ -DCMAKE_BUILD_TYPE=Release ..
+
+ make VERBOSE=1
+ make install DESTDIR=$PKG
+cd ..
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# Copy icon & desktop file to package
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+cat $CWD/k3d.desktop > $PKG/usr/share/applications/k3d.desktop
+cat web/k3d.png > $PKG/usr/share/pixmaps/k3d.png
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING INSTALL README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+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/k3d/k3d.desktop b/graphics/k3d/k3d.desktop
new file mode 100644
index 0000000000..42bd1225e0
--- /dev/null
+++ b/graphics/k3d/k3d.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=K-3D
+Comment=3D modeling and animation software
+Categories=Graphics;
+Exec=k3d
+Icon=k3d
+Terminal=false
+StartupNotify=false
+
diff --git a/graphics/k3d/k3d.info b/graphics/k3d/k3d.info
new file mode 100644
index 0000000000..6f7abd26bf
--- /dev/null
+++ b/graphics/k3d/k3d.info
@@ -0,0 +1,10 @@
+PRGNAM="k3d"
+VERSION="0.8.0.2"
+HOMEPAGE="http://www.k-3d.org/"
+DOWNLOAD="http://downloads.sourceforge.net/k3d/k3d-source-0.8.0.2.tar.bz2"
+MD5SUM="9f4808b8d5e324f69b72ef1950df45d7"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Niels Horn"
+EMAIL="niels.horn@gmail.com"
+APPROVED="Erik Hanson"
diff --git a/graphics/k3d/png14.patch b/graphics/k3d/png14.patch
new file mode 100644
index 0000000000..8f0895ac2e
--- /dev/null
+++ b/graphics/k3d/png14.patch
@@ -0,0 +1,53 @@
+--- k3d-source-0.8.0.2/k3dsdk/gil/boost/gil/extension/io/png_io_private.hpp 2010-07-02 23:27:47.000000000 -0300
++++ k3d-source-0.8.0.2_patched/k3dsdk/gil/boost/gil/extension/io/png_io_private.hpp 2010-07-13 08:04:55.000000000 -0300
+@@ -148,12 +148,12 @@
+ // allocate/initialize the image information data
+ _info_ptr = png_create_info_struct(_png_ptr);
+ if (_info_ptr == NULL) {
+- png_destroy_read_struct(&_png_ptr,png_infopp_NULL,png_infopp_NULL);
++ png_destroy_read_struct(&_png_ptr,NULL,NULL);
+ io_error("png_get_file_size: fail to call png_create_info_struct()");
+ }
+ if (setjmp(png_jmpbuf(_png_ptr))) {
+ //free all of the memory associated with the png_ptr and info_ptr
+- png_destroy_read_struct(&_png_ptr, &_info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&_png_ptr, &_info_ptr, NULL);
+ io_error("png_get_file_size: fail to call setjmp()");
+ }
+ png_init_io(_png_ptr, get());
+@@ -165,7 +165,7 @@
+ png_reader(const char* filename) : file_mgr(filename, "rb") { init(); }
+
+ ~png_reader() {
+- png_destroy_read_struct(&_png_ptr,&_info_ptr,png_infopp_NULL);
++ png_destroy_read_struct(&_png_ptr,&_info_ptr,NULL);
+ }
+ point2<std::ptrdiff_t> get_dimensions() {
+ return point2<std::ptrdiff_t>(png_get_image_width(_png_ptr,_info_ptr),
+@@ -177,7 +177,7 @@
+ int bit_depth, color_type, interlace_type;
+ png_get_IHDR(_png_ptr, _info_ptr,
+ &width, &height,&bit_depth,&color_type,&interlace_type,
+- int_p_NULL, int_p_NULL);
++ NULL, NULL);
+ io_error_if(((png_uint_32)view.width()!=width || (png_uint_32)view.height()!= height),
+ "png_read_view: input view size does not match PNG file size");
+
+@@ -219,7 +219,7 @@
+ int bit_depth, color_type, interlace_type;
+ png_get_IHDR(_png_ptr, _info_ptr,
+ &width, &height,&bit_depth,&color_type,&interlace_type,
+- int_p_NULL, int_p_NULL);
++ NULL, NULL);
+ io_error_if(((png_uint_32)view.width()!=width || (png_uint_32)view.height()!= height),
+ "png_reader_color_convert::apply(): input view size does not match PNG file size");
+ switch (color_type) {
+@@ -308,7 +308,7 @@
+ io_error_if(!_png_ptr,"png_write_initialize: fail to call png_create_write_struct()");
+ _info_ptr = png_create_info_struct(_png_ptr);
+ if (!_info_ptr) {
+- png_destroy_write_struct(&_png_ptr,png_infopp_NULL);
++ png_destroy_write_struct(&_png_ptr,NULL);
+ io_error("png_write_initialize: fail to call png_create_info_struct()");
+ }
+ if (setjmp(png_jmpbuf(_png_ptr))) {
diff --git a/graphics/k3d/slack-desc b/graphics/k3d/slack-desc
new file mode 100644
index 0000000000..57013e3482
--- /dev/null
+++ b/graphics/k3d/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------------------------------------------------------|
+k3d: k3d (3D modeling and animation software)
+k3d:
+k3d: K-3D is free-as-in-freedom 3D modeling and animation software.
+k3d: It features a plugin-oriented procedural engine for all of its
+k3d: content, making K-3D a very versatile and powerful package. K-3D
+k3d: excels at polygonal modeling, and includes basic tools for NURBS,
+k3d: patches, curves and animation.
+k3d:
+k3d: Homepage: http://www.k-3d.org/wiki/Main_Page
+k3d:
+k3d: