aboutsummaryrefslogtreecommitdiff
path: root/graphics/ldglite
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2010-05-13 00:58:19 +0200
committerErik Hanson <erik@slackbuilds.org>2010-05-13 00:58:19 +0200
commit1ee1dde6b821bd27e33ef6e3e36ee6aa822ffc9d (patch)
treeda294cf5023594cd816b813599e1b91e66344090 /graphics/ldglite
parente333c6672884214f73707adb061a356950312583 (diff)
graphics/ldglite: Added to 13.0 repository
Diffstat (limited to 'graphics/ldglite')
-rw-r--r--graphics/ldglite/README7
-rw-r--r--graphics/ldglite/cflags.patch11
-rw-r--r--graphics/ldglite/doinst.sh7
-rw-r--r--graphics/ldglite/ldglite.SlackBuild73
-rw-r--r--graphics/ldglite/ldglite.desktop11
-rw-r--r--graphics/ldglite/ldglite.info10
-rw-r--r--graphics/ldglite/ldglite.pngbin0 -> 326 bytes
-rw-r--r--graphics/ldglite/ldglite.sh2
-rw-r--r--graphics/ldglite/ldraw.xml58
-rw-r--r--graphics/ldglite/slack-desc19
10 files changed, 198 insertions, 0 deletions
diff --git a/graphics/ldglite/README b/graphics/ldglite/README
new file mode 100644
index 0000000000000..09fa2a1f3f88c
--- /dev/null
+++ b/graphics/ldglite/README
@@ -0,0 +1,7 @@
+ldglite is a program that lets you view and edit Lego brick models
+stored in LDRAW format.
+
+ldglite can also be used as a command-line utility to create images
+from models.
+
+This requires LDraw_data.
diff --git a/graphics/ldglite/cflags.patch b/graphics/ldglite/cflags.patch
new file mode 100644
index 0000000000000..5ad87edb8bf43
--- /dev/null
+++ b/graphics/ldglite/cflags.patch
@@ -0,0 +1,11 @@
+--- ldglite_orig/makefile.linux 2009-11-06 16:50:32.000000000 -0200
++++ ldglite/makefile.linux 2010-01-27 16:55:47.000000000 -0200
+@@ -42,7 +42,7 @@
+ LIBS = libmui.a
+ endif
+
+-CFLAGS=-g -DUNIX -DUSE_OPENGL -DUSE_L3_PARSER -DUSE_BMP8 -DNEED_MIN_MAX $(PNG_FLAGS) $(TR_FLAGS) $(OFFSCREEN_FLAGS) $(GUI_FLAGS)
++CFLAGS=-g -DUNIX -DUSE_OPENGL -DUSE_L3_PARSER -DUSE_BMP8 -DNEED_MIN_MAX $(PNG_FLAGS) $(TR_FLAGS) $(OFFSCREEN_FLAGS) $(GUI_FLAGS) $(SBO_FLAGS)
+ CXXFLAGS=$(CFLAGS)
+
+ SRCS = ldliteVR_main.c platform.c dirscan.c gleps.c camera.c f00QuatC.c quant.c stub.c lcolors.c y.tab.c lex.yy.c qbuf.c main.c ldglpr.c L3Edit.c L3Math.cpp L3Input.cpp L3View.cpp hoser.c ldglmenu.c plugstub.c $(TR_SRC) $(GUI_SRC)
diff --git a/graphics/ldglite/doinst.sh b/graphics/ldglite/doinst.sh
new file mode 100644
index 0000000000000..ba98b9dbd5071
--- /dev/null
+++ b/graphics/ldglite/doinst.sh
@@ -0,0 +1,7 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q /usr/share/applications >/dev/null 2>&1
+fi
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database /usr/share/mime >/dev/null 2>&1
+fi
+
diff --git a/graphics/ldglite/ldglite.SlackBuild b/graphics/ldglite/ldglite.SlackBuild
new file mode 100644
index 0000000000000..03e2a0a6c33e0
--- /dev/null
+++ b/graphics/ldglite/ldglite.SlackBuild
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Slackware build script for ldglite:
+# a program to view and edit LDraw files
+
+# Written by Niels Horn - niels.horn@gmail.com
+# revision date 2010/01/27
+
+PRGNAM=ldglite
+VERSION=1.2.4
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRCVERSION=$(echo $VERSION | tr . _)
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+# We cannot use -O2 - compilation will crash
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $TMP/$PRGNAM-$VERSION $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+unzip $CWD/${PRGNAM}${SRCVERSION}src.zip -d $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION/$PRGNAM
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# patch makefile.linux to add SBO_FLAGS
+patch < $CWD/cflags.patch
+
+SBO_FLAGS=$SLKCFLAGS ENABLE_OFFSCREEN_RENDERING=no make -f makefile.linux
+
+# Install manually
+mkdir -p $PKG/usr/bin
+cp -a $PRGNAM $PKG/usr/bin/${PRGNAM}_bin
+strip --strip-unneeded $PKG/usr/bin/${PRGNAM}_bin
+cat $CWD/$PRGNAM.sh > $PKG/usr/bin/$PRGNAM
+chmod 0755 $PKG/usr/bin/$PRGNAM
+
+# Copy icon & desktop file to package
+mkdir -p $PKG/usr/share/{applications,mime/packages,pixmaps}
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+cat $CWD/ldraw.xml > $PKG/usr/share/mime/packages/ldraw.xml
+
+cd doc
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LDGLITE.TXT LICENCE README.TXT bowtie.txt $PKG/usr/doc/$PRGNAM-$VERSION
+find $PKG/usr/doc/$PRGNAM-$VERSION/ -type f -exec chmod 644 {} \;
+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/ldglite/ldglite.desktop b/graphics/ldglite/ldglite.desktop
new file mode 100644
index 0000000000000..409d5357af8ab
--- /dev/null
+++ b/graphics/ldglite/ldglite.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=ldglite
+GenericName=ldglite LDRAW viewer and editor
+Categories=Graphics;
+Exec=/usr/bin/ldglite %f
+Icon=ldglite
+Terminal=false
+StartupNotify=false
+MimeType=application/x-ldraw;application/x-multipart-ldraw;
diff --git a/graphics/ldglite/ldglite.info b/graphics/ldglite/ldglite.info
new file mode 100644
index 0000000000000..717e97fb2f78f
--- /dev/null
+++ b/graphics/ldglite/ldglite.info
@@ -0,0 +1,10 @@
+PRGNAM="ldglite"
+VERSION="1.2.4"
+HOMEPAGE="http://ldglite.sourceforge.net"
+DOWNLOAD="http://downloads.sourceforge.net/ldglite/ldglite1_2_4src.zip"
+MD5SUM="217ff5e49c79ce4240dc88e7830045bb"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Niels Horn"
+EMAIL="niels.horn@gmail.com"
+APPROVED="Erik Hanson"
diff --git a/graphics/ldglite/ldglite.png b/graphics/ldglite/ldglite.png
new file mode 100644
index 0000000000000..eb24cc97e810c
--- /dev/null
+++ b/graphics/ldglite/ldglite.png
Binary files differ
diff --git a/graphics/ldglite/ldglite.sh b/graphics/ldglite/ldglite.sh
new file mode 100644
index 0000000000000..5e3d37e0eae0e
--- /dev/null
+++ b/graphics/ldglite/ldglite.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+LDRAWDIR=/usr/share/LDRAW ldglite_bin $1
diff --git a/graphics/ldglite/ldraw.xml b/graphics/ldglite/ldraw.xml
new file mode 100644
index 0000000000000..14726add1ff4b
--- /dev/null
+++ b/graphics/ldglite/ldraw.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-ldraw">
+ <comment>LDraw Model</comment>
+ <glob pattern="*.ldr" />
+ <glob pattern="*.LDR" />
+ <magic priority="60">
+ <match type="string" value="0\ ~Moved\ to" offset="0"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ LDRAW_ORG\ Part\ UPDATE" offset="0:1000"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ LDRAW_ORG\ Primitive" offset="0:1000"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ !LDRAW_ORG\ Part" offset="0:1000"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ !LDRAW_ORG\ Primitive" offset="0:1000"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ !LDRAW_ORG\ Shortcut" offset="0:1000"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ LDRAW_ORG\ Shortcut" offset="0:1000"/>
+ </magic>
+
+ <magic priority="60">
+ <match type="string" value="0\ Official\ LCad\ update" offset="0:1000"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ Official\ LCAD\ Part" offset="0:1000"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ Official\ LCad\ Part" offset="0:1000"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ Original\ LDraw\ Part" offset="0:1000"/>
+ </magic>
+ </mime-type>
+
+ <mime-type type="application/x-multipart-ldraw">
+ <comment>LDraw Model</comment>
+ <glob pattern="*.mpd" />
+ <glob pattern="*.MPD" />
+ <magic priority="60">
+ <match type="string" value="Author:\ MLCad" offset="0:1000"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ ROTATION\ CENTER\ " offset="0:1000"/>
+ </magic>
+ <magic priority="60">
+ <match type="string" value="0\ Unofficial\ Model" offset="0:1000"/>
+ </magic>
+ </mime-type>
+
+</mime-info>
diff --git a/graphics/ldglite/slack-desc b/graphics/ldglite/slack-desc
new file mode 100644
index 0000000000000..069d6aca55aee
--- /dev/null
+++ b/graphics/ldglite/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------------------------------------------------------|
+ldglite: ldglite (view and edit Lego brick models in LDRAW format)
+ldglite:
+ldglite: ldglite is a program that lets you view and edit Lego brick models
+ldglite: stored in LDRAW format.
+ldglite:
+ldglite: ldglite can also be used as a command-line utility to create images
+ldglite: from models.
+ldglite:
+ldglite: http://ldglite.sourceforge.net/
+ldglite:
+ldglite: