Skip to content

Commit

Permalink
x11/3ddesktop: Fix build with graphics/imlib2 1.12.1
Browse files Browse the repository at this point in the history
- Add license
- Put manpages in ${PREFIX}/share
- Pet portlint, portclippy, portfmt and Q/A check

Add minimal support to `pkg-config imlib2`; imlib2-config has been
dropped since imlib2-1.7.5.

PR:		276427
  • Loading branch information
nunotexbsd committed Jan 18, 2024
1 parent af0d94a commit 429bc46
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 14 deletions.
26 changes: 17 additions & 9 deletions x11/3ddesktop/Makefile
@@ -1,28 +1,36 @@
PORTNAME= 3ddesktop
PORTVERSION= 0.2.9
PORTREVISION= 15
PORTREVISION= 16
CATEGORIES= x11
MASTER_SITES= SF/desk3d/${PORTNAME}/${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT= 3D Virtual Desktop Switcher
WWW= https://desk3d.sourceforge.net/

LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING

LIB_DEPENDS= libImlib2.so:graphics/imlib2

USES= gl localbase xorg
USE_XORG= xmu
USE_GL= glut
GNU_CONFIGURE= yes
USES= gl localbase pkgconfig xorg
USE_GL= gl glu glut
USE_XORG= ice sm x11 xext xi xmu xt xxf86vm

PORTDOCS= README README.windowmanagers
PLIST_FILES= bin/3ddesk bin/3ddeskd etc/3ddesktop.conf \
%%DATADIR%%/digits.bmp \
man/man1/3ddesk.1.gz man/man1/3ddeskd.1.gz
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share

CPPFLAGS+= -DHAVE_DECL_GETOPT -pthread
LDFLAGS+= -pthread

PLIST_FILES= bin/3ddesk \
bin/3ddeskd \
etc/3ddesktop.conf \
share/man/man1/3ddesk.1.gz \
share/man/man1/3ddeskd.1.gz
PORTDATA= digits.bmp
PORTDOCS= README README.windowmanagers

OPTIONS_DEFINE= DOCS

post-patch:
Expand Down
4 changes: 2 additions & 2 deletions x11/3ddesktop/files/patch-config.cpp
@@ -1,6 +1,6 @@
--- config.cpp.orig
--- config.cpp.orig 2005-06-20 11:20:44 UTC
+++ config.cpp
@@ -64,8 +64,9 @@
@@ -64,8 +64,9 @@ get_boolean (char *value)
}


Expand Down
41 changes: 41 additions & 0 deletions x11/3ddesktop/files/patch-configure
@@ -0,0 +1,41 @@
Add minimal support to `pkg-config imlib2`; imlib2-config has been
dropped since imlib2-1.7.5.

--- configure.orig 2005-06-26 14:22:29 UTC
+++ configure
@@ -8112,22 +8112,20 @@ fi
echo "${ECHO_T}no" >&6
fi

-if test "$IMLIB2_CONFIG_IN_PATH" != yes; then
- echo "------- ERROR -------"
- echo "The imlib2-config development script was not found in your execute path."
- echo "You may have imlib2 installed somewhere not covered by your path."
- echo ""
- echo "If this is the case make sure you have the packages installed, AND"
- echo "that the imlib2-config script is in your execute path (see your"
- echo "shell's manual page on setting the \$PATH environment variable)."
- echo "---------------------"
- { { echo "$as_me:$LINENO: error: Fatal Error: no imlib2-config detected." >&5
-echo "$as_me: error: Fatal Error: no imlib2-config detected." >&2;}
- { (exit 1); exit 1; }; }
- exit;
+if test "$IMLIB2_CONFIG_IN_PATH" = yes; then
+ imlib2_cflags=`imlib2-config --cflags`
+ imlib2_libs=`imlib2-config --libs`
+else
+ if pkg-config imlib2; then
+ imlib2_cflags=`pkg-config imlib2 --cflags`
+ imlib2_libs=`pkg-config imlib2 --libs`
+ else
+ { { echo "$as_me:$LINENO: error: Fatal Error: no imlib2 detected." >&5
+ echo "$as_me: error: Fatal Error: no imlib2 detected." >&2;}
+ { (exit 1); exit 1; }; }
+ exit;
+ fi
fi
-imlib2_cflags=`imlib2-config --cflags`
-imlib2_libs=`imlib2-config --libs`



6 changes: 3 additions & 3 deletions x11/3ddesktop/files/patch-event.hpp
@@ -1,6 +1,6 @@
--- event.hpp.orig 2007-08-02 14:11:31.000000000 +0200
+++ event.hpp 2007-08-02 14:11:45.000000000 +0200
@@ -74,7 +74,7 @@
--- event.hpp.orig 2004-12-06 02:57:32 UTC
+++ event.hpp
@@ -74,7 +74,7 @@ class EventManager { (public)
list<Event *>::iterator k;
for (k = events.begin(); k != events.end(); ++k) {
Event *e = *k;
Expand Down

0 comments on commit 429bc46

Please sign in to comment.