aboutsummaryrefslogtreecommitdiff
path: root/dev/yasm
diff options
context:
space:
mode:
Diffstat (limited to 'dev/yasm')
-rw-r--r--dev/yasm/Manifest24
-rw-r--r--dev/yasm/yasm.SlackBuild157
2 files changed, 181 insertions, 0 deletions
diff --git a/dev/yasm/Manifest b/dev/yasm/Manifest
new file mode 100644
index 00000000..e9532c06
--- /dev/null
+++ b/dev/yasm/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST yasm-0.7.1.tar.gz 1412314 MD5 fce21d066f4d04e3ec7f9318e6446e2b RMD160 17d04237c2287f0ea646fae329a2a8abed0873ba SHA1 c8adeb363ef52ee67c6e8e3041b509330aa30c87 SHA256 6074d93d48abe7eb61de03fb584f9ae3a700f68f175a1059172f8766c0e21e00 SHA512 9177917601822bf7d3df9ca95f9e0b86e7dee2d6a2bb8936cf046502a5a9bfce7b866c940ddba7f17a5561fb64db0d9d890b765ab3d47e5f176049b172b1c966
+DIST yasm-0.8.0.tar.gz 1419273 MD5 84a72204c9b452a00b39b1b00495163f RMD160 bec5b791f9ec121c52858f726943203901e6b7e7 SHA1 9d04e1c24c3f21b040fb298f3ec2f4dab252c569 SHA256 b5a9d4c99fb9d678eafc735f2eb9a05c193e6e6f7b0d45ed686796f3bfc8d887 SHA512 52a825bf7089e55d56ee474dd077bb7e6c076e9979367c4d90e395140d1e3e908e0c5cc84969dbb65e16668059ec34480d62a8b9bdaaa400d7332caf3b711488
+MKBUILD yasm.mkbuild 2923 MD5 ee5ff66e92e2cb6710446ddb7fc1b75e RMD160 a7431d24f7c31d28a15a3cc423783ee16d4ce40b SHA1 5e1cca0b6692f31da9d2f932c05ae35bb2f205a1 SHA256 05b5170659b704d951244f22e1f66ca767072744246bad6fc3280137ab5d3a43 SHA512 c55df0cf90065e9d29261d534cbaa5955d9a009161826a64e464a634ade1d2eeadf3046172d975ab797a4986179bb31b9a673808503f89e09f16bcf00152d3a1
+SLACKBUILD yasm.SlackBuild 5147 MD5 c36de857015fab5d5c4ba1732df86b02 RMD160 4616f630be5ef71eee760638efeb65f44667eb29 SHA1 f04d196a5ea5526d195d740ade2ebf954b57c005 SHA256 a7f8adabf79bca74a7165d3bdc22bbf3c3aa69b4762c3b4e54b436c90916fd73 SHA512 0a7426f4c478fbe6ae346c17beeaf0e8218aca07f6c9040b56c41915a3dbea1b097edc9fd9fefe100f1acac39fbfd20f2f3847f5bdc10a60d47b78c49ea5135e
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJ80s/AAoJEEHL93ESzgein+cP/0N641QplvPduagX5yknXtpF
+dVQt+GGdAUmPIpl8TgnjpqYN/dk1furPuL4yoSRCoaIbFlB3PeOz6b0ds1Dy4b5O
+4IeuD2EAd4cITZgxDUX3l/GS3UPfqgSrDfLeyPXsrAcwAb/onzoF/EKDSckDoPgS
+CS+ACOa3r3/mGBmybXvoQwDudcrKjH2oMHng74a7B8k/ntyMs3BfDm1Geo8WnclE
+US5+QM8zbAaWiiL45zTnkMobXpg76ft4xyKF0VXSdO2t+2FrInfq588w04/Yx0o5
++KbH8/jtIYBPKxHM/5yRsIc5wq+iVpraVNDxvY8ciqDM8HNudDH46H14h7uqDHnf
++CubjJdok0/RlcTgfvq/IoM858ygn1DL1+XtyMyii2vewIJ+/ixq6FFjmjfRvjGq
+vRUEvOR4x6uhoWOV/dSNkRpn1yB9+vkpg5m++O0TUvv3rxDGVUDORncqJspQG16e
+s5jHSUPQmTeR2iqhaN+fZqE93SC4dcf3ZtC6HmgbqcU8G1sHgrVHffX50x1JxLEN
+Tx1gne99yJiVVaQqevbXGNNc9B4Sv6bjYceIlbvWHq7m8taysoCqMcVc1Sq1IVJV
+tgxITln8jg6olXXcXP1WtCZJL+q2tzhHp+Bx7W+7L5irnE6TW7nqDtA0OjWDbssK
+0n/8uwGzTMe6jeexV16a
+=WG1c
+-----END PGP SIGNATURE-----
diff --git a/dev/yasm/yasm.SlackBuild b/dev/yasm/yasm.SlackBuild
new file mode 100644
index 00000000..8ebce0bf
--- /dev/null
+++ b/dev/yasm/yasm.SlackBuild
@@ -0,0 +1,157 @@
+#!/bin/bash
+#
+# yasm.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
+#
+# yasm.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for yasm, by Silvio Rhatto
+# requires:
+# tested: yasm-0.8.0
+# model: generic.mkSlackBuild $Rev: 805 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="yasm"
+PKG_NAME="yasm"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=0.8.0}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
+TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
+REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="dev/yasm"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
+fi
+
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
+
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://www.tortall.net/projects/yasm/releases/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
+
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="ABOUT-NLS AUTHORS Artistic.txt BSD.txt COPYING ChangeLog GNU_GPL-2.0 GNU_LGPL-2.0 INSTALL Mkfiles NEWS README"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# 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---------------------------------------------------------|
+yasm: yasm (a NASM assembler)
+yasm:
+yasm: Yasm is a complete rewrite of the NASM assembler. It is designed
+yasm: from the ground up to allow for multiple syntaxes to be supported
+yasm: (e.g., NASM, TASM, GAS, etc.) in addition to multiple output object
+yasm: formats. Another primary module of the overall design is an optimizer
+yasm: module. Major features include x86 and AMD64 architecture support,
+yasm: ELF, COFF, and Win32 object formats, and STABS debugging output.
+yasm:
+yasm:
+yasm:
+EODESC
+
+# Build the package
+cd "$PKG"
+mkdir -p $REPOS/$SLACKBUILD_PATH
+makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+
+# Delete source and build directories if requested
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
+ rm -rf "$PKG_WORK" "$PKG"
+fi