SHA256
1
0
forked from pool/SDL_bgi
Jan Engelhardt 2020-02-20 16:06:35 +00:00 committed by Git OBS Bridge
parent ff628029b9
commit 2eeef5e3cb
7 changed files with 62 additions and 92 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b9125854a894924d1292bad2da52ee991ce238f24417ec9cff770b45e7cf54ea
size 1343418

3
SDL_bgi-2.4.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fcdc9ec49b583412fee5825ca6446cc28a1bc61045bf9732db138e92bb9561b8
size 1396648

2
SDL_bgi-rpmlintrc Normal file
View File

@ -0,0 +1,2 @@
# Go home rpmlint, you are drunk. libSDL_bgisuse3 is not the right name.
addFilter("shlib-policy-name-error")

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Feb 20 15:46:54 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Update to release 2.4.0
* Hershey font support as a replacement for the original
Borland .chr fonts.
* If the SDL_BGI_RES environment variable is set to "VGA",
initgraph (DETECT, ...) forces VGA (640x480) resolution.
* Added getlinebuffer() and putlinebuffer()
* Changed 8x8 bitmap font using the one from the DosBox emulator.
- Drop sdlbgi-automake.diff, add sdlbgi-cmake.diff.
-------------------------------------------------------------------
Wed Jan 22 17:32:44 UTC 2020 - Jan Engelhardt <jengelh@inai.de>

View File

@ -17,8 +17,8 @@
Name: SDL_bgi
%define lname libSDL_bgi2
Version: 2.3.1
%define lname libSDL_bgi-suse3
Version: 2.4.0
Release: 0
Summary: BGI-compatible 2D graphics C library with SDL backend
License: Zlib AND GPL-2.0-or-later
@ -26,9 +26,9 @@ Group: Development/Libraries/X11
URL: http://libXbgi.sf.net/
Source: http://downloads.sf.net/libxbgi/%name-%version.tar.gz
Patch1: sdlbgi-automake.diff
BuildRequires: automake >= 1.11
BuildRequires: libtool >= 2
Source9: %name-rpmlintrc
Patch1: sdlbgi-cmake.diff
BuildRequires: cmake
BuildRequires: pkg-config
BuildRequires: pkgconfig(sdl2)
@ -65,37 +65,25 @@ together.
%patch -P 1 -p1
%build
autoreconf -fi
%configure --disable-static
make %{?_smp_mflags}
%cmake
%make_build
%install
%make_install
%cmake_install
b="%buildroot"
rm -f "$b/%_libdir"/*.la
mkdir -p "$b/%_includedir/SDL_bgi" "$b/%_libdir/pkgconfig"
ln -s "../SDL2/SDL_bgi.h" "$b/%_includedir/SDL_bgi/graphics.h"
install -pm0644 test/dos.h test/conio.h "$b/%_includedir/SDL_bgi/"
cat >"$b/%_libdir/pkgconfig/SDL_bgi.pc" <<-EOF
Name: SDL_bgi
Description: BGI-compatible API with SDL backend
Version: %version
Requires: sdl SDL_gfx
Libs: -lSDL_bgi
EOF
mkdir -p "$b/%_defaultdocdir"
mv "$b/%_datadir/doc/%name" "$b/%_defaultdocdir/"
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%doc LICENSE
%_libdir/libSDL_bgi.so.2*
%_libdir/libSDL_bgi.so.suse3
%files -n libSDL_bgi-devel
%doc README.md doc/*
%_includedir/SDL2/
%_includedir/SDL_bgi/
%_defaultdocdir/%name/
%_includedir/*
%_libdir/libSDL_bgi.so
%_libdir/pkgconfig/SDL_bgi.pc
%changelog

View File

@ -1,64 +0,0 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2014-12-18 11:43:21.385084191 +0100
Refresh: Wed Dec 2 14:19:14 CET 2015
Author could not decide between "sdlbgifast" and "bgifast"
(same for bgislow), so add extra symbols to enable both names.
---
Makefile.am | 2 ++
configure.ac | 9 +++++++++
src/Makefile.am | 8 ++++++++
test/Makefile.am | 11 +++++++++++
4 files changed, 30 insertions(+)
Index: SDL_bgi-2.2.2/Makefile.am
===================================================================
--- /dev/null
+++ SDL_bgi-2.2.2/Makefile.am
@@ -0,0 +1,2 @@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = src test
Index: SDL_bgi-2.2.2/configure.ac
===================================================================
--- /dev/null
+++ SDL_bgi-2.2.2/configure.ac
@@ -0,0 +1,9 @@
+AC_INIT([SDL_bgi], [2.3.0])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+AC_PROG_CC
+AM_INIT_AUTOMAKE([foreign subdir-objects tar-pax dist-xz no-dist-gzip])
+LT_INIT
+PKG_CHECK_MODULES([sdl2], [sdl2])
+AC_CONFIG_FILES([Makefile src/Makefile test/Makefile])
+AC_OUTPUT
Index: SDL_bgi-2.2.2/src/Makefile.am
===================================================================
--- /dev/null
+++ SDL_bgi-2.2.2/src/Makefile.am
@@ -0,0 +1,8 @@
+AM_CPPFLAGS = ${sdl2_CFLAGS}
+AM_CFLAGS = -Wall
+lib_LTLIBRARIES = libSDL_bgi.la
+libSDL_bgi_la_SOURCES = SDL_bgi.c
+libSDL_bgi_la_LIBADD = -lm ${sdl2_LIBS}
+libSDL_bgi_la_LDFLAGS = -no-undefined -version-info 2:0:0
+pkgincludedir = ${includedir}/SDL2
+pkginclude_HEADERS = SDL_bgi.h
Index: SDL_bgi-2.2.2/test/Makefile.am
===================================================================
--- /dev/null
+++ SDL_bgi-2.2.2/test/Makefile.am
@@ -0,0 +1,11 @@
+AM_CPPFLAGS = -I${top_srcdir}/src
+AM_CFLAGS = -Wall
+EXTRA_PROGRAMS = \
+ cellular dla fern floodfilltest hopalong kaleido life \
+ mandelbrot mousetest moveit plasma sdlbgidemo simple turtledemo
+LDADD = ../src/libSDL_bgi.la
+hopalong_LDADD = ${LDADD} -lm
+plasma_LDADD = ${LDADD} -lm
+sdlbgidemo_LDADD = ${LDADD} -lm
+turtledemo_SOURCES = turtle.c turtledemo.c
+turtledemo_LDADD = ${LDADD} -lm

32
sdlbgi-cmake.diff Normal file
View File

@ -0,0 +1,32 @@
Fix stupid build strategy.
And add some library versioning.
---
CMakeLists.txt | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: SDL_bgi-2.4.0/CMakeLists.txt
===================================================================
--- SDL_bgi-2.4.0.orig/CMakeLists.txt
+++ SDL_bgi-2.4.0/CMakeLists.txt
@@ -20,9 +20,6 @@ include_directories (SDL2Test ${SDL2_INC
# Default install directory variables
include (GNUInstallDirs)
-# fix stupid bug on Linux
-string (STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES)
-
# Find source files
file (GLOB SOURCES src/*.c)
@@ -31,6 +28,8 @@ include_directories (src)
# Create shared library
add_library (${PROJECT_NAME} SHARED ${SOURCES})
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION suse3)
+target_link_libraries(${PROJECT_NAME} -lm ${SDL2_LIBRARIES})
# Install library
install (TARGETS ${PROJECT_NAME}