diff options
author | Niels Horn <niels.horn@gmail.com> | 2010-10-24 22:05:42 -0400 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2010-10-25 07:55:09 -0500 |
commit | 715be7de44e9b111611774a8b614eb5cefeb695b (patch) | |
tree | a7a7528833f8a30406c7126421a45ee27df8e11b /development | |
parent | 529d50ba9169155619e833110025abd52a2dda50 (diff) |
development/kicad: Added (Open Source EDA Suite)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/kicad/README | 9 | ||||
-rw-r--r-- | development/kicad/doinst.sh | 5 | ||||
-rw-r--r-- | development/kicad/help_path.patch | 10 | ||||
-rw-r--r-- | development/kicad/kicad.SlackBuild | 90 | ||||
-rw-r--r-- | development/kicad/kicad.info | 10 | ||||
-rw-r--r-- | development/kicad/slack-desc | 19 |
6 files changed, 143 insertions, 0 deletions
diff --git a/development/kicad/README b/development/kicad/README new file mode 100644 index 0000000000000..1486d92894bcf --- /dev/null +++ b/development/kicad/README @@ -0,0 +1,9 @@ +The KiCad project aims at creating a portable, cross-platform, Free/Libre/ +Open-Source EDA Suite, capable of schematic and printed circuit board +design. The suite consist of a project manager, schematic editor, +netlist converter, pcb designer and a gerber viewer. + +There are separate SlackBuilds for the libraries and additional +documentation, kicad-library and kicad-doc. + +This requires wxGTK diff --git a/development/kicad/doinst.sh b/development/kicad/doinst.sh new file mode 100644 index 0000000000000..f8f852bc2bc56 --- /dev/null +++ b/development/kicad/doinst.sh @@ -0,0 +1,5 @@ +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/development/kicad/help_path.patch b/development/kicad/help_path.patch new file mode 100644 index 0000000000000..6116e478c3114 --- /dev/null +++ b/development/kicad/help_path.patch @@ -0,0 +1,10 @@ +--- kicad-bzr_20100608/common/edaappl.cpp 2010-09-25 08:49:59.000000000 -0300 ++++ kicad-bzr_20100608_patched/common/edaappl.cpp 2010-09-25 13:46:19.000000000 -0300 +@@ -891,7 +891,6 @@ + // from a distribution files are in /usr/share/doc/kicad/help and binaries + // in /usr/bin or /usr/local/bin + subdirs.Add( wxT( "share" ) ); +- subdirs.Add( _T( "doc" ) ); + subdirs.Add( wxT( "kicad" ) ); + subdirs.Add( _T( "help" ) ); + diff --git a/development/kicad/kicad.SlackBuild b/development/kicad/kicad.SlackBuild new file mode 100644 index 0000000000000..be169fd3acc13 --- /dev/null +++ b/development/kicad/kicad.SlackBuild @@ -0,0 +1,90 @@ +#!/bin/sh + +# Slackware build script for kicad +# Open-Source EDA Suite + +# Written by Niels Horn <niels.horn@gmail.com> +# Revision date: 2010/09/25 + +PRGNAM=kicad +VERSION=${VERSION:-bzr_20100608} +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-$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 solve path to help-files from kicad-doc package +# This is not the cleanest solution, but it works, and the source code itself +# admits being "hacky"... +patch -p1 < $CWD/help_path.patch + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DKICAD_DOCS=/usr/doc/$PRGNAM-$VERSION \ + -DKICAD_PLUGINS=/usr/lib${LIBDIRSUFFIX}/$PRGNAM/plugins \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make + 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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS.txt CHANGELOG.txt COPYRIGHT.txt INSTALL.txt README.txt TODO.txt \ + $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/development/kicad/kicad.info b/development/kicad/kicad.info new file mode 100644 index 0000000000000..92e64fe6f1871 --- /dev/null +++ b/development/kicad/kicad.info @@ -0,0 +1,10 @@ +PRGNAM="kicad" +VERSION="bzr_20100608" +HOMEPAGE="http://kicad.sourceforge.net/wiki" +DOWNLOAD="http://www.nielshorn.net/_download/slackware/source/kicad-bzr_20100608.tar.bz2" +MD5SUM="e7403db547bcde3757b57119450ff645" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Niels Horn" +EMAIL="niels.horn@gmail.com" +APPROVED="dsomero" diff --git a/development/kicad/slack-desc b/development/kicad/slack-desc new file mode 100644 index 0000000000000..cc6f5cc02008e --- /dev/null +++ b/development/kicad/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------------------------------------------------------| +kicad: kicad (Open Source EDA Suite) +kicad: +kicad: The KiCad project aims at creating a portable, cross-platform, +kicad: Free/Libre/Open-Source EDA Suite, capable of schematic and printed +kicad: circuit board design. +kicad: The suite consist of a project manager, schematic editor, netlist +kicad: converter, pcb designer and a gerber viewer. +kicad: +kicad: Homepage: http://kicad.sourceforge.net/wiki +kicad: +kicad: |