Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

games-rpg/xu4: update to 1.2.1 #30799

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions dev-libs/boron/Manifest
@@ -0,0 +1 @@
DIST boron-2.0.8.tar.gz 351968 BLAKE2B c89b61ca2cf55960edd5cfbb8b6bfe9501cfca775a250d325d5f2874423aafca5d9157600a1859c17909c6948f47830613e42b2b916335636876c60ffe7782d2 SHA512 b583dfafc10a640c2cf919b38e5bcdfcbe146e874d4c41fbd4fc6d510ea38938b3e91de502f42e5b2923c9dd201358ffe15c0df47655ac8a8ed2294979338db0
35 changes: 35 additions & 0 deletions dev-libs/boron/boron-2.0.8.ebuild
@@ -0,0 +1,35 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="A scripting language similar to REBOL"
HOMEPAGE="https://urlan.sourceforge.net/boron/"
SRC_URI="mirror://sourceforge/urlan/${P}.tar.gz"

LICENSE="LGPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="bzip2 readline"

DEPEND="
bzip2? ( app-arch/bzip2:= )
!bzip2? ( sys-libs/zlib:= )
"
RDEPEND="${DEPEND}"

PATCHES=(
"${FILESDIR}/2.0.8_makefile.patch"
)

src_configure() {
# Non-standard configure
./configure \
$(usex bzip2 "--bzip2" "") \
|| die
}

src_install() {
emake DESTDIR="${D}/usr" install install-dev
dodoc README.md
}
59 changes: 59 additions & 0 deletions dev-libs/boron/files/2.0.8_makefile.patch
@@ -0,0 +1,59 @@
From 8f796a61697e9efe1d6e5498b807e74fc274af24 Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Fri, 28 Apr 2023 12:01:28 +0300
Subject: [PATCH] Fixes to buildsystem

* Properly respect CFLAGS
* Respect LDFLAGS
* Don't compress man-pages
* Don't strip binaries
--- a/Makefile
+++ b/Makefile
@@ -11,8 +11,7 @@ VIM_DIR=$(DESTDIR)/share/vim/vimfiles/syntax

OS := $(shell uname)

-CFLAGS = -pipe -pedantic -Wall -W -Iinclude -Iurlan -Ieval -Isupport
-CFLAGS += -O3 -DNDEBUG
+CFLAGS += -pipe -pedantic -Wall -W -Iinclude -Iurlan -Ieval -Isupport
#CFLAGS += -g -DDEBUG

ifeq ($(OS), Darwin)
@@ -91,7 +90,7 @@ $(ODIR)/%.o: eval/%.c
cc -c $(CFLAGS) $(CONFIG) $< -o $@

boron: $(EXE_OBJS) $(BORON_LIB)
- cc $^ -o $@ $(EXE_LIBS)
+ cc $^ -o $@ $(EXE_LIBS) $(LDFLAGS)

$(ODIR)/os.o: unix/os.c
cc -c $(CFLAGS) $(CONFIG) $< -o $@
@@ -108,7 +107,7 @@ ifdef STATIC_LIB
else ifeq ($(OS), Darwin)
libtool -dynamiclib -o $@ $^ -install_name @rpath/$(BORON_LIB) $(LIBS)
else
- cc -o $@ -shared -Wl,-soname,libboron.so.2 $^ $(LIBS)
+ cc -o $@ -shared -Wl,-soname,libboron.so.2 $^ $(LIBS) $(LDFLAGS)
ln -sf $(BORON_LIB) libboron.so.2
ln -sf $(BORON_LIB) libboron.so
endif
@@ -130,13 +129,12 @@ ifeq ($(OS), Darwin)
install_name_tool -change libboron.dylib $(LIB_DIR)/libboron.dylib boron
install -m 644 libboron.dylib $(LIB_DIR)
else
- install -m 755 -s $(BORON_LIB) $(LIB_DIR)
+ install -m 755 $(BORON_LIB) $(LIB_DIR)
ln -s $(BORON_LIB) $(LIB_DIR)/libboron.so.2
endif
endif
- install -s -m 755 boron $(BIN_DIR)
- gzip -c -n doc/boron.troff > doc/boron.1.gz
- install -m 644 doc/boron.1.gz $(MAN_DIR)
+ install -m 755 boron $(BIN_DIR)
+ install -m 644 doc/boron.troff $(MAN_DIR)/boron.1

uninstall:
rm -f $(BIN_DIR)/boron $(MAN_DIR)/boron.1
--
2.39.2

15 changes: 15 additions & 0 deletions dev-libs/boron/metadata.xml
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>azamat.hackimov@gmail.com</email>
<name>Azamat H. Hackimov</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<upstream>
<remote-id type="sourceforge">urlan</remote-id>
</upstream>
</pkgmetadata>
4 changes: 2 additions & 2 deletions games-rpg/xu4/Manifest
@@ -1,3 +1,3 @@
DIST u4upgrad.zip 632072 BLAKE2B 3691f1cbac940021ef6043dd5e2ee26dcee5f8d7181ed525179211a6984f5ab498b84533d28146129c3e747f0af8946f7d691b7cb817a5a4ecb39e71e2df7b9a SHA512 4832d8cfd266d3ccc5eab5184bd2b6b9acd4c0203478873fb5e11704d95104dd9285a7752bad77f873d4f8603673184ae9421964509b948ec69944a4ceadd083
DIST ultima4-1.01.zip 537487 BLAKE2B 9af5c934e57d3b0151a575efc3ed34fa25f81ed2c43e2cb95ee200afb1b2f49365634199e066787de3d20c4c97903f918de2a4d4f2e9aeeb361ee585e59fbbc1 SHA512 c86c29d51e21b93992316552fbaaec948e7e8048fea484f003f43ac82211f82fa587fb15db991cddf744f2c3ff0fc4d411cd51cc7650e13a5b520c4dc620518c
DIST xu4-0.9.tar.gz 320090 BLAKE2B 298a97edd2c42edcc2f63ec99656e76f3c541fce13f01a0767f02f63223e0d842a33ee1012742b7cd5bdefa7c66cddba6799130f539a8bb306c87ece8585ea62 SHA512 6c0b27472074d96a5f76e024c800bed89c57c29dbd760278c819ad8b024362480bda5f1584eb9fe64fd6f6cae0b3b8d8571c8cf533f25b842471803acd7cea8d
DIST ultima4.zip 529099 BLAKE2B 62a7e6e05344d0c3496ee3240d6cd98c61f1ff8b8f5d869a8cecec8f786b76c8a42e1bef40fa63861d5652352c00ba67708e49b5e6c9ddfdebbb3ae47ae01e2e SHA512 efc65a53492c0f68c9e2f1507afed4da925992cdfec7a699095e6369725af8156331000c575778121e04ef6ca252af2eef97f8f7183b8378f22a4e7e509fb9a5
DIST xu4-1.2.1.gh.tar.gz 8031041 BLAKE2B 54c75d1752bc7a5cf59724e2e97ccfed23b8edf8351b6ccf9ca4f967145bbbb897e06337c107ffe09af5094f2f112094cd60485d9957abac6e61a3e40dd6731e SHA512 ffdfcb9f323b4f3ff664b146b485085dd96fce756682392695e8a25f636c70d6b2d945b65f861a58fd1a47653a788869aa3085be8e1bcc702814fb220cfdeb3e
76 changes: 0 additions & 76 deletions games-rpg/xu4/files/0.9-savegame.patch

This file was deleted.

25 changes: 25 additions & 0 deletions games-rpg/xu4/files/1.2.1-desktop-file.patch
@@ -0,0 +1,25 @@
From d5065c2c7f3b26bb21cb6d55bab8b0161c60b7d6 Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Fri, 28 Apr 2023 20:42:37 +0300
Subject: [PATCH] Update .desktop file

Follow to Desktop Entry Specification.

https://github.com/xu4-engine/u4/pull/15

--- a/dist/xu4.desktop
+++ b/dist/xu4.desktop
@@ -3,7 +3,7 @@ Encoding=UTF-8
Name=Ultima 4
Comment=Ultima 4 (xu4)
Exec=xu4
-Icon=xu4.png
-Terminal=0
+Icon=xu4
+Terminal=false
Type=Application
-Categories=Application;Game;RolePlaying;
+Categories=Game;RolePlaying;
--
2.39.2

82 changes: 82 additions & 0 deletions games-rpg/xu4/files/1.2.1-system-minizip.patch
@@ -0,0 +1,82 @@
From bce27acd4063d43da601e0a7a85b35fab69cf4bd Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Fri, 28 Apr 2023 16:30:40 +0300
Subject: [PATCH] Switch to external zlib minizip library

Bundled unzip.[ch] uses deprecated zlib macros and fails to compile.
Additionaly added pkg-config calls to use system libraries and includes.

https://github.com/xu4-engine/u4/pull/16
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,11 +8,13 @@ UI ?= glv
GPU ?= scale
SOUND=faun

+PKG_CONFIG ?= pkg-config
+
ifeq ($(UI), allegro)
ifeq ($(SOUND),allegro)
- UILIBS=-lallegro_acodec -lallegro_audio -lallegro
+ UILIBS=$(shell ${PKG_CONFIG} --libs allegro-5 allegro_acodec-5 allegro_audio-5)
else
- UILIBS=-lallegro
+ UILIBS=$(shell ${PKG_CONFIG} --libs allegro-5)
endif
endif

@@ -37,23 +39,25 @@ endif
UILIBS+=-lboron
#endif

-CXXFLAGS=-Wall -I. -Isupport $(UIFLAGS) -DVERSION=\"$(VERSION)\"
+CXXFLAGS+=-Wall -I. -Isupport $(UIFLAGS) -DVERSION=\"$(VERSION)\"
#CXXFLAGS+=-rdynamic -DHAVE_BACKTRACE=1 -DHAVE_VARIADIC_MACROS=1

# Choose one of these for debug/release mode.
#CXXFLAGS+=-g -DDEBUG
CXXFLAGS+=-O3 -DNDEBUG

+CXXFLAGS+=$(shell ${PKG_CONFIG} --cflags minizip)
+
ifeq ($(UI), glv)
CXXFLAGS+=-Iglv/x11
GLV_SRC=glv/x11/glv.c
-UILIBS+=-lXcursor -lX11
+UILIBS+=$(shell ${PKG_CONFIG} --libs xcursor x11)
CFLAGS=$(CXXFLAGS) -DUSE_CURSORS
else
CFLAGS=$(CXXFLAGS)
endif

-LIBS=$(UILIBS) -lGL -lpng -lz
+LIBS=$(UILIBS) $(shell ${PKG_CONFIG} --libs gl libpng minizip zlib)

ifeq ($(STATIC_GCC_LIBS),true)
LDFLAGS+=-L. -static-libgcc
--- a/src/Makefile.common
+++ b/src/Makefile.common
@@ -9,7 +9,6 @@ CSRCS=\
support/notify.c \
support/stringTable.c \
support/txf_draw.c \
- unzip.c \
$(NULL)

CXXSRCS=\
--- a/src/u4file.cpp
+++ b/src/u4file.cpp
@@ -6,9 +6,9 @@
#include <cctype>
#include <cstring>
#include <cstdlib>
+#include <unzip.h>

#include "u4file.h"
-#include "unzip.h"
#include "debug.h"
#include "xu4.h"

--
2.39.2

35 changes: 0 additions & 35 deletions games-rpg/xu4/files/xu4-0.9-ldflags.patch

This file was deleted.

26 changes: 0 additions & 26 deletions games-rpg/xu4/files/xu4-0.9-warnings.patch

This file was deleted.