Skip to content

Commit

Permalink
x11/idesk: Fix build with graphics/imlib2 1.12.1
Browse files Browse the repository at this point in the history
- Fix build with imlib2 1.12.1 due to imlib2-config drop in 1.7.5
  in favor of pkgconfig
- Fix SN option build (lib depends)
- Add license
- Pet portlint, portclippy, portfmt and Q/A check

PR:		276370
  • Loading branch information
nunotexbsd committed Jan 18, 2024
1 parent 06f249d commit ff4bc28
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 46 deletions.
32 changes: 20 additions & 12 deletions x11/idesk/Makefile
@@ -1,32 +1,40 @@
PORTNAME= idesk
PORTVERSION= 0.7.5
PORTREVISION= 11
PORTREVISION= 12
CATEGORIES= x11
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}

MAINTAINER= acm@FreeBSD.org
COMMENT= Place launch icons and background directly on your desktop
WWW= https://idesk.sourceforge.net

LIB_DEPENDS= libXft.so:x11-fonts/libXft \
libImlib2.so:graphics/imlib2
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING

GNU_CONFIGURE= yes
USES= gmake pkgconfig tar:bzip2
LIB_DEPENDS= libImlib2.so:graphics/imlib2 \
libXft.so:x11-fonts/libXft

OPTIONS_DEFINE= SHAPE SN DOCS
SHAPE_DESC= Support of XShape extension
SN_DESC= Startup notification support
OPTIONS_DEFAULT= SHAPE
USES= gmake pkgconfig tar:bzip2 xorg
USE_XORG= ice sm x11

GNU_CONFIGURE= yes

CXXFLAGS+= `imlib2-config --cflags` `freetype-config --cflags`
MAKE_ARGS= cc="${CXX}" cflags="${CXXFLAGS}"
MAKE_ARGS= cc="${CXX}" \
cflags="${CXXFLAGS}"
SUB_FILES= pkg-message
PLIST_FILES= bin/${PORTNAME}
PORTDOCS= README

OPTIONS_DEFINE= DOCS SHAPE SN
OPTIONS_DEFAULT= SHAPE

SHAPE_DESC= Support of XShape extension
SN_DESC= Startup notification support

SHAPE_USE= XORG=xext
SHAPE_CONFIGURE_ENABLE= shape
SN_LIB_DEPENDS= libstartup-notification.so:x11/startup-notification

SN_LIB_DEPENDS= libstartup-notification-1.so:x11/startup-notification
SN_CONFIGURE_ON= --enable-libsn

do-install:
Expand Down
32 changes: 32 additions & 0 deletions x11/idesk/files/patch-configure
@@ -0,0 +1,32 @@
work around removed imlib2-config

Index: configure
--- configure.orig 2005-11-10 23:31:38 UTC
+++ configure
@@ -7030,13 +7030,8 @@ echo $ECHO_N "checking for imlib2... $ECHO_C" >&6
echo "$as_me:$LINENO: checking for imlib2" >&5
echo $ECHO_N "checking for imlib2... $ECHO_C" >&6
no_imlib2=""
- if test "$IMLIB2_CONFIG" = "no" ; then
- no_imlib2=yes
- else
- IMLIB2_CFLAGS="`$IMLIB2_CONFIG $imlib2_config_args --cflags`"
- IMLIB2_LIBS="`$IMLIB2_CONFIG $imlib2_config_args --libs`"
-
- fi
+ IMLIB2_CFLAGS="`pkg-config --cflags imlib2`"
+ IMLIB2_LIBS="`pkg-config --libs imlib2`"
if test "x$no_imlib2" = x ; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
@@ -7067,8 +7062,8 @@ echo "$as_me: error: Cannot find imlib2: Is imlib2-con



-IMLIB_LIBS=`imlib2-config --libs`
-IMLIB_CFLAGS=`imlib2-config --cflags`
+IMLIB_LIBS=`pkg-config --libs imlib2`
+IMLIB_CFLAGS=`pkg-config --cflags imlib2`



26 changes: 10 additions & 16 deletions x11/idesk/files/patch-src_DesktopConfig.cpp
@@ -1,16 +1,10 @@
*** src/DesktopConfig.cpp.orig Mon Sep 5 21:03:05 2005
--- src/DesktopConfig.cpp Mon Sep 12 22:38:55 2005
***************
*** 22,31 ****
--- 22,32 ----
* (See the included file COPYING / BSD )
*/

#include "DesktopConfig.h"
#include "Util.h"
+ #include "sys/stat.h"

//the initilizer list just sets the program defaults for non-necessary options
DesktopConfig::DesktopConfig(Database db, string ideskrcFile) :
AbstractConfig(ideskrcFile)
{
--- src/DesktopConfig.cpp.orig 2005-11-10 23:07:58 UTC
+++ src/DesktopConfig.cpp
@@ -24,6 +24,7 @@

#include "DesktopConfig.h"
#include "Util.h"
+#include "sys/stat.h"

//the initilizer list just sets the program defaults for non-necessary options
DesktopConfig::DesktopConfig(Database db, string ideskrcFile) :
4 changes: 2 additions & 2 deletions x11/idesk/files/patch-src_Timer.cpp
@@ -1,5 +1,5 @@
--- src/Timer.cpp.orig Mon Aug 15 07:26:39 2005
+++ src/Timer.cpp Tue Sep 13 23:14:32 2005
--- src/Timer.cpp.orig 2005-08-15 05:26:39 UTC
+++ src/Timer.cpp
@@ -26,6 +26,7 @@
#include "Database.h"
#include <X11/Xlib.h>
Expand Down
26 changes: 10 additions & 16 deletions x11/idesk/files/patch-src_XImlib2Background.cpp
@@ -1,16 +1,10 @@
*** src/XImlib2Background.cpp.orig Tue Sep 6 01:03:34 2005
--- src/XImlib2Background.cpp Mon Sep 12 22:39:11 2005
***************
*** 23,32 ****
--- 23,33 ----
*/

#include "Database.h"
#include "XImlib2Background.h"
#include <X11/Xatom.h>
+ #include "sys/stat.h"

XImlib2Background::XImlib2Background(AbstractContainer * c, AbstractConfig * con): TimerControl(),
container(c), config(con),delay(0), mode(0), save(NULL), show(NULL),
srctime(0), images(""), directory(""), OneShot(false)
{
--- src/XImlib2Background.cpp.orig 2005-11-10 23:08:55 UTC
+++ src/XImlib2Background.cpp
@@ -26,6 +26,7 @@
#include "Database.h"
#include "XImlib2Background.h"
#include <X11/Xatom.h>
+#include "sys/stat.h"

XImlib2Background::XImlib2Background(AbstractContainer * c, AbstractConfig * con): TimerControl(),
container(c), config(con),delay(0), mode(0), save(NULL), show(NULL),

0 comments on commit ff4bc28

Please sign in to comment.