From db0023fac11d4e65292884b9af79c11d99f5ff7e Mon Sep 17 00:00:00 2001 From: Niclas Zeising Date: Mon, 24 Aug 2020 20:21:07 +0000 Subject: [PATCH] x11-drivers/xf86-video-geode: Fix -fno-common Fix the build of x11-drivers/xf86-video-geode when compiled with -fno-common, which is the default with llvm 11. While here, add license. MFH: 2020Q3 (implicit, -fno-common fixes, ok by joenum) --- x11-drivers/xf86-video-geode/Makefile | 3 ++ .../xf86-video-geode/files/patch-src_geode.h | 34 +++++++++++++++++++ .../files/patch-src_gx__video.c | 11 ++++++ .../files/patch-src_lx__driver.c | 11 ++++++ .../xf86-video-geode/files/patch-src_panel.c | 11 ++++++ .../files/patch-src_panel_panel.c | 11 ++++++ 6 files changed, 81 insertions(+) create mode 100644 x11-drivers/xf86-video-geode/files/patch-src_geode.h create mode 100644 x11-drivers/xf86-video-geode/files/patch-src_gx__video.c create mode 100644 x11-drivers/xf86-video-geode/files/patch-src_lx__driver.c create mode 100644 x11-drivers/xf86-video-geode/files/patch-src_panel.c create mode 100644 x11-drivers/xf86-video-geode/files/patch-src_panel_panel.c diff --git a/x11-drivers/xf86-video-geode/Makefile b/x11-drivers/xf86-video-geode/Makefile index cbbf3e59792c..87f281eb7bb5 100644 --- a/x11-drivers/xf86-video-geode/Makefile +++ b/x11-drivers/xf86-video-geode/Makefile @@ -8,6 +8,9 @@ CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org geode display driver +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/COPYING + USES= xorg-cat:driver ONLY_FOR_ARCHS= i386 diff --git a/x11-drivers/xf86-video-geode/files/patch-src_geode.h b/x11-drivers/xf86-video-geode/files/patch-src_geode.h new file mode 100644 index 000000000000..83aa9a0a1b17 --- /dev/null +++ b/x11-drivers/xf86-video-geode/files/patch-src_geode.h @@ -0,0 +1,34 @@ +--- src/geode.h.orig 2020-08-24 18:11:55 UTC ++++ src/geode.h +@@ -343,7 +343,7 @@ typedef struct _geodeRec { + + /* option flags are self-explanatory */ + #ifdef HAVE_LX +-enum { ++enum LX_GeodeOpts { + LX_OPTION_SW_CURSOR, + LX_OPTION_HW_CURSOR, + LX_OPTION_NOCOMPRESSION, +@@ -357,11 +357,11 @@ enum { + LX_OPTION_FBSIZE, + LX_OPTION_PANEL_MODE, + LX_OPTION_DONT_PROGRAM +-} LX_GeodeOpts; ++}; + #endif + + #ifdef HAVE_GX +-enum { ++enum GX_GeodeOpts { + GX_OPTION_SW_CURSOR, + GX_OPTION_HW_CURSOR, + GX_OPTION_NOCOMPRESSION, +@@ -378,7 +378,7 @@ enum { + GX_OPTION_FBSIZE, + GX_OPTION_PANEL_GEOMETRY, + GX_OPTION_DONT_PROGRAM +-} GX_GeodeOpts; ++}; + #endif + + /* geode_dcon.c */ diff --git a/x11-drivers/xf86-video-geode/files/patch-src_gx__video.c b/x11-drivers/xf86-video-geode/files/patch-src_gx__video.c new file mode 100644 index 000000000000..bd42b5a8a88f --- /dev/null +++ b/x11-drivers/xf86-video-geode/files/patch-src_gx__video.c @@ -0,0 +1,11 @@ +--- src/gx_video.c.orig 2020-08-24 18:14:49 UTC ++++ src/gx_video.c +@@ -112,7 +112,7 @@ void GXSetVideoPosition(int x, int y, int width, int h + + extern void GXAccelSync(ScrnInfoPtr pScrni); + +-int DeltaX, DeltaY; ++extern int DeltaX, DeltaY; + + unsigned long graphics_lut[256]; + static int lutflag = 0; diff --git a/x11-drivers/xf86-video-geode/files/patch-src_lx__driver.c b/x11-drivers/xf86-video-geode/files/patch-src_lx__driver.c new file mode 100644 index 000000000000..d6c10448998a --- /dev/null +++ b/x11-drivers/xf86-video-geode/files/patch-src_lx__driver.c @@ -0,0 +1,11 @@ +--- src/lx_driver.c.orig 2020-08-24 20:15:55 UTC ++++ src/lx_driver.c +@@ -74,7 +74,7 @@ + + extern OptionInfoRec LX_GeodeOptions[]; + +-unsigned char *XpressROMPtr; ++extern unsigned char *XpressROMPtr; + + static Bool + LXSaveScreen(ScreenPtr pScrn, int mode) diff --git a/x11-drivers/xf86-video-geode/files/patch-src_panel.c b/x11-drivers/xf86-video-geode/files/patch-src_panel.c new file mode 100644 index 000000000000..2e38b77c4995 --- /dev/null +++ b/x11-drivers/xf86-video-geode/files/patch-src_panel.c @@ -0,0 +1,11 @@ +--- src/panel.c.orig 2019-09-20 16:17:28 UTC ++++ src/panel.c +@@ -51,7 +51,7 @@ + #define PLATFORM_DORADO 1 /* Dorado + 9211 RevC */ + #define PLATFORM_GX2BASED 1 /* Redcloud */ + +-unsigned char *XpressROMPtr; ++extern unsigned char *XpressROMPtr; + + #include "pnl_init.c" + #include "pnl_bios.c" diff --git a/x11-drivers/xf86-video-geode/files/patch-src_panel_panel.c b/x11-drivers/xf86-video-geode/files/patch-src_panel_panel.c new file mode 100644 index 000000000000..7a3aaa6480aa --- /dev/null +++ b/x11-drivers/xf86-video-geode/files/patch-src_panel_panel.c @@ -0,0 +1,11 @@ +--- src/panel/panel.c.orig 2019-09-20 16:17:28 UTC ++++ src/panel/panel.c +@@ -65,7 +65,7 @@ extern unsigned long gfx_detect_video(void); + #define PLATFORM_DORADO 1 /* Dorado + 9211 RevC */ + #define PLATFORM_REDCLOUD 1 /* GX2 */ + +-unsigned char *XpressROMPtr; ++extern unsigned char *XpressROMPtr; + + #include "pnl_init.c" + #include "pnl_bios.c"