Hi,

The below diff allows building skippy with -fno-common. While here:

- MASTER_SITES and HOMEPAGE are 404'd, drop them
- refresh WANTLIB
- don't hardcode PREFIX, don't build with -g
- add -fno-common fix, from Gentoo [0] (and add a missing RCS tag)

This has been built and tested on amd64 and macppc.

OK? 

Charlène.


[0]
https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-misc/skippy/files/skippy-0.5.0-fno-common.patch


Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/skippy/Makefile,v
retrieving revision 1.21
diff -u -p -u -p -r1.21 Makefile
--- Makefile    12 Jul 2019 20:51:21 -0000      1.21
+++ Makefile    6 Feb 2021 10:46:16 -0000
@@ -3,24 +3,21 @@
 COMMENT=               full-screen X11 task-switcher like Apple's Expose
 
 DISTNAME=              skippy-0.5.0
-REVISION=              8
+REVISION=              9
 CATEGORIES=            x11
 
-MASTER_SITES=          http://thegraveyard.org/files/
 EXTRACT_SUFX=          .tar.bz2
 
-HOMEPAGE=              http://thegraveyard.org/skippy.php
-
 # X11
-PERMIT_PACKAGE=        Yes
+PERMIT_PACKAGE=                Yes
 
-WANTLIB=       X11 Xau Xdmcp Xext Xft Xinerama Xrender c expat fontconfig \
-               freetype m z xcb Imlib2
+WANTLIB+= Imlib2 X11 Xext Xft Xinerama c m
 
+LIB_DEPENDS=           graphics/imlib2
 
-NO_TEST=               Yes
+FAKE_FLAGS+=           PREFIX="${PREFIX}"
 
-LIB_DEPENDS=           graphics/imlib2
+NO_TEST=               Yes
 
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/skippy
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/x11/skippy/patches/patch-Makefile,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-Makefile
--- patches/patch-Makefile      22 Jul 2005 19:32:17 -0000      1.2
+++ patches/patch-Makefile      6 Feb 2021 10:46:16 -0000
@@ -1,15 +1,19 @@
 $OpenBSD: patch-Makefile,v 1.2 2005/07/22 19:32:17 fgsch Exp $
---- Makefile.orig      Wed May 19 18:23:50 2004
-+++ Makefile   Wed Jul 13 16:34:00 2005
-@@ -1,7 +1,7 @@
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -1,9 +1,9 @@
  PREFIX = /usr/local
  BINDIR = ${PREFIX}/bin
  
 -X11PREFIX = /usr/X11R6
 +X11PREFIX = ${X11BASE}
  
- CFLAGS += -I${X11PREFIX}/include `imlib2-config --cflags` `pkg-config xft 
--cflags` -g -pedantic -Wall
+-CFLAGS += -I${X11PREFIX}/include `imlib2-config --cflags` `pkg-config xft 
--cflags` -g -pedantic -Wall
++CFLAGS += -I${X11PREFIX}/include `imlib2-config --cflags` `pkg-config xft 
--cflags` -pedantic -Wall
  LDFLAGS += -L${X11PREFIX}/lib -lX11 -lm `imlib2-config --libs` `pkg-config 
xft --libs`
+ 
+ # Comment these out to disable Xinerama support
 @@ -17,11 +17,15 @@ EXESUFFIX =
  
  SOURCES = skippy.c wm.c dlist.c mainwin.c clientwin.c layout.c focus.c 
config.c tooltip.c
Index: patches/patch-wm_c
===================================================================
RCS file: /cvs/ports/x11/skippy/patches/patch-wm_c,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-wm_c
--- patches/patch-wm_c  3 Jan 2009 23:02:57 -0000       1.3
+++ patches/patch-wm_c  6 Feb 2021 10:46:16 -0000
@@ -1,6 +1,59 @@
---- wm.c.orig  Wed May 19 23:23:49 2004
-+++ wm.c       Sat Jan  3 23:56:53 2009
-@@ -258,7 +258,7 @@ wm_get_stack(Display *dpy)
+$OpenBSD$
+
+Hunk #1: fix the build with -fno-common
+
+Index: wm.c
+--- wm.c.orig
++++ wm.c
+@@ -43,7 +43,47 @@
+ #define WIN_STATE_FIXED_POSITION  (1<<8) /*window is fixed in position even*/
+ #define WIN_STATE_ARRANGE_IGNORE  (1<<9) /*ignore for auto arranging*/
+ 
++Atom
++      /* Generic atoms */
++      XA_WM_STATE,
++      WM_CLIENT_LEADER,
++      XA_UTF8_STRING,
+ 
++      /* Root pixmap / wallpaper atoms */
++      _XROOTPMAP_ID,
++      ESETROOT_PMAP_ID,
++
++      /* NetWM atoms */
++      _NET_SUPPORTING_WM_CHECK,
++      _NET_SUPPORTED,
++      _NET_NUMBER_OF_DESKTOPS,
++      _NET_CLIENT_LIST,
++      _NET_CLIENT_LIST_STACKING,
++      _NET_CURRENT_DESKTOP,
++      _NET_WM_DESKTOP,
++      _NET_WM_STATE,
++      _NET_WM_STATE_HIDDEN,
++      _NET_WM_STATE_SKIP_TASKBAR,
++      _NET_WM_STATE_SKIP_PAGER,
++      _NET_WM_STATE_FULLSCREEN,
++      _NET_WM_STATE_SHADED,
++      _NET_WM_STATE_ABOVE,
++      _NET_WM_STATE_STICKY,
++      _NET_WM_WINDOW_TYPE,
++      _NET_WM_WINDOW_TYPE_DESKTOP,
++      _NET_WM_WINDOW_TYPE_DOCK,
++      _NET_WM_VISIBLE_NAME,
++      _NET_WM_NAME,
++
++      /* Old gnome atoms */
++      _WIN_SUPPORTING_WM_CHECK,
++      _WIN_WORKSPACE,
++      _WIN_WORKSPACE_COUNT,
++      _WIN_PROTOCOLS,
++      _WIN_CLIENT_LIST,
++      _WIN_STATE,
++      _WIN_HINTS;
++
+ static int WM_PERSONALITY = WM_PERSONALITY_NETWM,
+            NETWM_HAS_FULLSCREEN = 0,
+            IGNORE_SKIP_TASKBAR = 0;
+@@ -258,7 +298,7 @@ wm_get_stack(Display *dpy)
                return 0;
        
        for(i = 0; i < items_read; i++)
@@ -9,7 +62,7 @@
        
        XFree(data);
        
-@@ -293,10 +293,10 @@ wm_get_root_pmap(Display *dpy)
+@@ -293,10 +333,10 @@ wm_get_root_pmap(Display *dpy)
        return rootpmap;
  }
  
@@ -22,7 +75,7 @@
        unsigned char *data;
        int status, real_format;
        Atom real_type;
-@@ -309,7 +309,7 @@ wm_get_current_desktop(Display *dpy)
+@@ -309,7 +349,7 @@ wm_get_current_desktop(Display *dpy)
        if(status != Success)
                return 0;
        if(items_read)
@@ -31,7 +84,7 @@
        XFree(data);
        
        return desktop;
-@@ -479,7 +479,7 @@ wm_validate_window(Display *dpy, Window win)
+@@ -479,7 +519,7 @@ wm_validate_window(Display *dpy, Window win)
                
                return result;
        } else {
@@ -40,7 +93,7 @@
                
                status = XGetWindowProperty(dpy, win, _WIN_STATE,
                                  0L, 1L, False, XA_CARDINAL, &real_type, 
&real_format,
-@@ -490,7 +490,7 @@ wm_validate_window(Display *dpy, Window win)
+@@ -490,7 +530,7 @@ wm_validate_window(Display *dpy, Window win)
                                XFree(data);
                        return 0;
                }
@@ -49,7 +102,7 @@
                                             WIN_STATE_SHADED |
                                             WIN_STATE_HIDDEN);
                if(attr)
-@@ -510,7 +510,7 @@ wm_validate_window(Display *dpy, Window win)
+@@ -510,7 +550,7 @@ wm_validate_window(Display *dpy, Window win)
                                        XFree(data);
                                return 1; /* If there's no _WIN_HINTS, assume 
it's 0, thus valid */
                        }
@@ -58,7 +111,7 @@
                        if(attr & WIN_HINTS_SKIP_TASKBAR)
                                result = 0;
                        XFree(data);
-@@ -520,14 +520,14 @@ wm_validate_window(Display *dpy, Window win)
+@@ -520,14 +560,14 @@ wm_validate_window(Display *dpy, Window win)
        }
  }
  
@@ -75,7 +128,7 @@
        
        if(WM_PERSONALITY == WM_PERSONALITY_GNOME)
        {
-@@ -537,7 +537,7 @@ wm_get_window_desktop(Display *dpy, Window win)
+@@ -537,7 +577,7 @@ wm_get_window_desktop(Display *dpy, Window win)
                if(status == Success)
                {
                        if(items_read)
@@ -84,7 +137,7 @@
                        
                        XFree(data);
                        
-@@ -555,7 +555,7 @@ wm_get_window_desktop(Display *dpy, Window win)
+@@ -555,7 +595,7 @@ wm_get_window_desktop(Display *dpy, Window win)
                return wm_get_current_desktop(dpy);
        
        if(items_read)
Index: patches/patch-wm_h
===================================================================
RCS file: /cvs/ports/x11/skippy/patches/patch-wm_h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-wm_h
--- patches/patch-wm_h  22 Jul 2005 19:32:17 -0000      1.2
+++ patches/patch-wm_h  6 Feb 2021 10:46:16 -0000
@@ -1,6 +1,19 @@
 $OpenBSD: patch-wm_h,v 1.2 2005/07/22 19:32:17 fgsch Exp $
---- wm.h.orig  Wed May 19 18:23:50 2004
-+++ wm.h       Wed Jul 13 16:43:40 2005
+
+Hunk #1: fix the build with -fno-common
+
+Index: wm.h
+--- wm.h.orig
++++ wm.h
+@@ -20,7 +20,7 @@
+ #ifndef SKIPPY_WM_H
+ #define SKIPPY_WM_H
+ 
+-Atom
++extern Atom
+       /* Generic atoms */
+       XA_WM_STATE,
+       WM_CLIENT_LEADER,
 @@ -66,12 +66,12 @@ char wm_check(Display *dpy);
  void wm_use_netwm_fullscreen(Bool b);
  dlist *wm_get_stack(Display *dpy);

Reply via email to