diff options
author | Andre Barboza <bmg.andre@gmail.com> | 2014-06-12 10:34:33 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-06-18 16:18:58 -0500 |
commit | 58335604b077dffcf90519be8d51909e8b328efe (patch) | |
tree | 2390cc2316b921b4f1259726928569c42d4533af /development/libxbgi | |
parent | cafd277b6665b7a69f0ddc56f4273fb6e246f64c (diff) | |
download | slackbuilds-58335604b077dffcf90519be8d51909e8b328efe.tar.gz |
development/libxbgi: Added (Xlib-based port).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/libxbgi')
-rw-r--r-- | development/libxbgi/README | 8 | ||||
-rw-r--r-- | development/libxbgi/libxbgi-cmake.patch | 239 | ||||
-rw-r--r-- | development/libxbgi/libxbgi.SlackBuild | 96 | ||||
-rw-r--r-- | development/libxbgi/libxbgi.info | 10 | ||||
-rw-r--r-- | development/libxbgi/slack-desc | 19 |
5 files changed, 372 insertions, 0 deletions
diff --git a/development/libxbgi/README b/development/libxbgi/README new file mode 100644 index 0000000000..a89a2161a4 --- /dev/null +++ b/development/libxbgi/README @@ -0,0 +1,8 @@ +This page provides binaries and documentation +for libXbgi, an Xlib-based port of old Borland +Graphics Interface to X11. + +libXbgi is a compatibility library that can be +used to port old programs written for +Turbo/Borland C to X11, on Linux and other +Unix-like systems. diff --git a/development/libxbgi/libxbgi-cmake.patch b/development/libxbgi/libxbgi-cmake.patch new file mode 100644 index 0000000000..fd61454736 --- /dev/null +++ b/development/libxbgi/libxbgi-cmake.patch @@ -0,0 +1,239 @@ +diff -U 3 -H -b -B -d -r -N -- xbgi-364/CMakeLists.txt xbgi-364.new/CMakeLists.txt +--- xbgi-364/CMakeLists.txt 1969-12-31 21:00:00.000000000 -0300 ++++ xbgi-364.new/CMakeLists.txt 2014-06-11 16:37:15.304000974 -0300 +@@ -0,0 +1,15 @@ ++cmake_minimum_required(VERSION 2.8) ++PROJECT(Xbgi) ++add_subdirectory(src) ++set (VERSION 364) ++set (DOC_FILES ++ Functions.txt ++ License.txt ++ README ++ TODO.txt ++ Using.txt ++) ++ ++install(FILES ${DOC_FILES} ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/doc/libxbgi-${VERSION}") ++ +diff -U 3 -H -b -B -d -r -N -- xbgi-364/src/CMakeLists.txt xbgi-364.new/src/CMakeLists.txt +--- xbgi-364/src/CMakeLists.txt 1969-12-31 21:00:00.000000000 -0300 ++++ xbgi-364.new/src/CMakeLists.txt 2014-06-11 17:34:49.036184249 -0300 +@@ -0,0 +1,117 @@ ++set (sources ++ _graphfreemem.c ++ _graphgetmem.c ++ arc.c ++ bar.c ++ bar3d.c ++ circle.c ++ cleardevice.c ++ clearviewport.c ++ closegraph.c ++ detectgraph.c ++ drawpoly.c ++ ellipse.c ++ fillellipse.c ++ fillpoly.c ++ floodfill.c ++ getarccoords.c ++ getaspectratio.c ++ getbkcolor.c ++ getch.c ++ getcolor.c ++ getdate.c ++ getdefaultpalette.c ++ getdrivername.c ++ getfillpattern.c ++ getfillsettings.c ++ getgraphmode.c ++ getimage.c ++ getlinesettings.c ++ getmaxcolor.c ++ getmaxmode.c ++ getmaxx.c ++ getmaxy.c ++ getmodename.c ++ getmoderange.c ++ getpalette.c ++ getpalettesize.c ++ getpixel.c ++ gettextsettings.c ++ getviewsettings.c ++ getx.c ++ gety.c ++ graphdefaults.c ++ grapherrormsg.c ++ graphresult.c ++ imagesize.c ++ initgraph.c ++ installuserdriver.c ++ installuserfont.c ++ kbhit.c ++ line.c ++ linerel.c ++ lineto.c ++ moverel.c ++ moveto.c ++ outtext.c ++ outtextxy.c ++ pieslice.c ++ putimage.c ++ putpixel.c ++ rectangle.c ++ registerbgidriver.c ++ registerbgifont.c ++ restorecrtmode.c ++ rotated.c ++ sector.c ++ setactivepage.c ++ setallpalette.c ++ setaspectratio.c ++ setbkcolor.c ++ setcolor.c ++ setfillpattern.c ++ setfillstyle.c ++ setgraphbufsize.c ++ setgraphmode.c ++ setlinestyle.c ++ setpalette.c ++ setrgbpalette.c ++ settextjustify.c ++ settextstyle.c ++ setusercharsize.c ++ setviewport.c ++ setvisualpage.c ++ setwritemode.c ++ textheight.c ++ textwidth.c ++ delay.c ++ COLOR.c ++ getmaxheight.c ++ getmaxwidth.c ++ getmouseclick.c ++ initwindow.c ++ ismouseclick.c ++ mouseclick.c ++ mousex.c ++ mousey.c ++ _putpixel.c ++ IS_BGI_COLOR.c ++ IS_RGB_COLOR.c ++ setrgbcolor.c ++ setbkrgbcolor.c ++ getevent.c ++ converttorgb.c ++ xkbhit.c ++ refresh.c ++) ++add_library(Xbgi STATIC ${sources}) ++include(FindPkgConfig QUIET) ++if(PKG_CONFIG_FOUND) ++ configure_file("libXbgi.pc.in" "libXbgi.pc" @ONLY) ++ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libXbgi.pc" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig") ++endif() ++install(TARGETS Xbgi ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/") ++install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/graphics.h" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/include/") +diff -U 3 -H -b -B -d -r -N -- xbgi-364/src/Makefile xbgi-364.new/src/Makefile +--- xbgi-364/src/Makefile 2013-10-28 10:31:21.000000000 -0200 ++++ xbgi-364.new/src/Makefile 1969-12-31 21:00:00.000000000 -0300 +@@ -1,79 +0,0 @@ +-# +-# $Id: Makefile,v 0.1 1993/12/10 01:24:53 king Exp king $ +-# +-SRC = _graphfreemem.c _graphgetmem.c arc.c bar.c bar3d.c circle.c\ +- cleardevice.c clearviewport.c closegraph.c detectgraph.c drawpoly.c\ +- ellipse.c fillellipse.c fillpoly.c floodfill.c\ +- getarccoords.c getaspectratio.c getbkcolor.c getch.c getcolor.c\ +- getdate.c getdefaultpalette.c getdrivername.c getfillpattern.c\ +- getfillsettings.c getgraphmode.c getimage.c getlinesettings.c\ +- getmaxcolor.c getmaxmode.c getmaxx.c getmaxy.c getmodename.c\ +- getmoderange.c getpalette.c getpalettesize.c getpixel.c\ +- gettextsettings.c getviewsettings.c getx.c gety.c graphdefaults.c\ +- grapherrormsg.c graphresult.c imagesize.c initgraph.c\ +- installuserdriver.c installuserfont.c kbhit.c line.c linerel.c lineto.c\ +- moverel.c moveto.c outtext.c outtextxy.c pieslice.c putimage.c\ +- putpixel.c rectangle.c registerbgidriver.c registerbgifont.c\ +- restorecrtmode.c rotated.c sector.c setactivepage.c setallpalette.c\ +- setaspectratio.c setbkcolor.c setcolor.c setfillpattern.c\ +- setfillstyle.c setgraphbufsize.c setgraphmode.c setlinestyle.c\ +- setpalette.c setrgbpalette.c settextjustify.c settextstyle.c\ +- setusercharsize.c setviewport.c setvisualpage.c setwritemode.c\ +- textheight.c textwidth.c delay.c\ +- COLOR.c getmaxheight.c getmaxwidth.c getmouseclick.c\ +- initwindow.c ismouseclick.c mouseclick.c mousex.c mousey.c _putpixel.c\ +- IS_BGI_COLOR.c IS_RGB_COLOR.c setrgbcolor.c setbkrgbcolor.c\ +- getevent.c converttorgb.c xkbhit.c refresh.c +- +-OBJ = _graphfreemem.o _graphgetmem.o arc.o bar.o bar3d.o circle.o\ +- cleardevice.o clearviewport.o closegraph.o detectgraph.o drawpoly.o\ +- ellipse.o fillellipse.o fillpoly.o floodfill.o\ +- getarccoords.o getaspectratio.o getbkcolor.o getch.o getcolor.o\ +- getdate.o getdefaultpalette.o getdrivername.o getfillpattern.o\ +- getfillsettings.o getgraphmode.o getimage.o getlinesettings.o\ +- getmaxcolor.o getmaxmode.o getmaxx.o getmaxy.o getmodename.o\ +- getmoderange.o getpalette.o getpalettesize.o getpixel.o\ +- gettextsettings.o getviewsettings.o getx.o gety.o graphdefaults.o\ +- grapherrormsg.o graphresult.o imagesize.o initgraph.o\ +- installuserdriver.o installuserfont.o kbhit.o line.o linerel.o lineto.o\ +- moverel.o moveto.o outtext.o outtextxy.o pieslice.o putimage.o\ +- putpixel.o rectangle.o registerbgidriver.o registerbgifont.o\ +- restorecrtmode.o rotated.o sector.o setactivepage.o setallpalette.o\ +- setaspectratio.o setbkcolor.o setcolor.o setfillpattern.o\ +- setfillstyle.o setgraphbufsize.o setgraphmode.o setlinestyle.o\ +- setpalette.o setrgbpalette.o settextjustify.o settextstyle.o\ +- setusercharsize.o setviewport.o setvisualpage.o setwritemode.o\ +- textheight.o textwidth.o delay.o\ +- COLOR.o getmaxheight.o getmaxwidth.o getmouseclick.o\ +- initwindow.o ismouseclick.o mouseclick.o mousex.o mousey.o _putpixel.o\ +- IS_BGI_COLOR.o IS_RGB_COLOR.o setrgbcolor.o setbkrgbcolor.o\ +- getevent.o converttorgb.o xkbhit.o refresh.o +- +-LIB = libXbgi.a +- +-# C compiler: tested with gcc and clang +-CC = gcc +-CFLAGS = -O2 +-AR = ar +-ARFLAGS = rc +-INC_DIR = /usr/include +-LIB_DIR = /usr/lib +- +-.c.o: +- $(CC) $(CFLAGS) -c $< +- +-libXbgi.a: $(OBJ) +- $(AR) $(ARFLAGS) $(LIB) $(OBJ) +- +-install: $(LIB) graphics.h +- cp $(LIB) $(LIB_DIR);\ +- cp graphics.h $(INC_DIR) +- +-demo: demo.c +- $(CC) $(CFLAGS) -o demo demo.c $(LIB) -lX11 -lm +- +-clean: +- rm -f $(OBJ) *~ usleep.o demo +- +-usleep.o: usleep.c +- gcc -c -D_BSD_SIGNALS -DC usleep.c +Binary files xbgi-364/src/libXbgi.a and xbgi-364.new/src/libXbgi.a differ +diff -U 3 -H -b -B -d -r -N -- xbgi-364/src/libXbgi.pc.in xbgi-364.new/src/libXbgi.pc.in +--- xbgi-364/src/libXbgi.pc.in 1969-12-31 21:00:00.000000000 -0300 ++++ xbgi-364.new/src/libXbgi.pc.in 2014-06-11 17:20:58.927827248 -0300 +@@ -0,0 +1,11 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib@LIB_SUFFIX@ ++includedir=${prefix}/include ++ ++Name: @CMAKE_PROJECT_NAME@ ++Description: Xlib-based port of old Borland Graphics Interface to X11 ++Version: @VERSION@ ++Libs: -L${libdir} -lXbgi -lX11 -lm ++Cflags: -I${includedir} ++ diff --git a/development/libxbgi/libxbgi.SlackBuild b/development/libxbgi/libxbgi.SlackBuild new file mode 100644 index 0000000000..f88eb5cae2 --- /dev/null +++ b/development/libxbgi/libxbgi.SlackBuild @@ -0,0 +1,96 @@ +#!/bin/sh + +# Slackware build script for libxbgi + +# Copyright 2014 Andre Barboza Belo Horizonte, Brazil +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=libxbgi +VERSION=${VERSION:-364} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +SRCNAM=xbgi + +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 $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +patch -p1 < $CWD/libxbgi-cmake.patch + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/libxbgi/libxbgi.info b/development/libxbgi/libxbgi.info new file mode 100644 index 0000000000..f9fbe6fe63 --- /dev/null +++ b/development/libxbgi/libxbgi.info @@ -0,0 +1,10 @@ +PRGNAM="libxbgi" +VERSION="364" +HOMEPAGE="http://libxbgi.sourceforge.net/" +DOWNLOAD="http://libxbgi.sourceforge.net/xbgi-364.tar.gz" +MD5SUM="954231210d11fb027bf0bb63bbc154fd" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Andre Barboza" +EMAIL="bmg.andre@gmail.com" diff --git a/development/libxbgi/slack-desc b/development/libxbgi/slack-desc new file mode 100644 index 0000000000..e425f3dbb6 --- /dev/null +++ b/development/libxbgi/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +libxbgi: libxbgi (Xlib-based port of old Borland Graphics Interface to X11) +libxbgi: +libxbgi: libXbgi is a compatibility library that can be used to port old +libxbgi: programs written for Turbo/Borland C to X11, on Linux and other +libxbgi: Unix-like systems. +libxbgi: +libxbgi: +libxbgi: +libxbgi: +libxbgi: +libxbgi: |