From a026d607b389129479065e808350bf69902c3130 Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 24 Oct 2022 21:07:21 -0300 Subject: [PATCH] jinx: xf86-video-fbdev port --- .../xf86-video-fbdev/jinx-working-patch.patch | 85 +++++++++++++++++++ recipes/xf86-video-fbdev | 24 ++++++ source-recipes/xf86-video-fbdev | 9 ++ 3 files changed, 118 insertions(+) create mode 100644 patches/xf86-video-fbdev/jinx-working-patch.patch create mode 100644 recipes/xf86-video-fbdev create mode 100644 source-recipes/xf86-video-fbdev diff --git a/patches/xf86-video-fbdev/jinx-working-patch.patch b/patches/xf86-video-fbdev/jinx-working-patch.patch new file mode 100644 index 00000000..3634b7a9 --- /dev/null +++ b/patches/xf86-video-fbdev/jinx-working-patch.patch @@ -0,0 +1,85 @@ +diff --git xf86-video-fbdev-clean/configure.ac xf86-video-fbdev-workdir/configure.ac +index 27778cd..4e53999 100644 +--- xf86-video-fbdev-clean/configure.ac ++++ xf86-video-fbdev-workdir/configure.ac +@@ -55,11 +55,6 @@ AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], + [Enable use of libpciaccess (default: disabled)]), + [PCIACCESS=$enableval], [PCIACCESS=no]) + +-# Store the list of server defined optional extensions in REQUIRED_MODULES +-XORG_DRIVER_CHECK_EXT(RANDR, randrproto) +-XORG_DRIVER_CHECK_EXT(RENDER, renderproto) +-XORG_DRIVER_CHECK_EXT(XV, videoproto) +- + # Obtain compiler/linker options for the driver dependencies + PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES]) + +@@ -86,6 +81,8 @@ AC_SUBST([moduledir]) + DRIVER_NAME=fbdev + AC_SUBST([DRIVER_NAME]) + ++AC_SUBST([SYSROOT]) ++ + AC_CONFIG_FILES([ + Makefile + src/Makefile +diff --git xf86-video-fbdev-clean/src/Makefile.am xf86-video-fbdev-workdir/src/Makefile.am +index fbe420e..1ef5f49 100644 +--- xf86-video-fbdev-clean/src/Makefile.am ++++ xf86-video-fbdev-workdir/src/Makefile.am +@@ -25,7 +25,7 @@ + # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. + AM_CFLAGS = @XORG_CFLAGS@ + fbdev_drv_la_LTLIBRARIES = fbdev_drv.la +-fbdev_drv_la_LDFLAGS = -module -avoid-version ++fbdev_drv_la_LDFLAGS = -module -avoid-version -R@moduledir@ -L@SYSROOT@@moduledir@ -lfbdevhw -lshadow + fbdev_drv_ladir = @moduledir@/drivers + + fbdev_drv_la_SOURCES = \ +diff --git xf86-video-fbdev-clean/src/fbdev.c xf86-video-fbdev-workdir/src/fbdev.c +index f25ef72..cc92cb1 100644 +--- xf86-video-fbdev-clean/src/fbdev.c ++++ xf86-video-fbdev-workdir/src/fbdev.c +@@ -339,7 +339,7 @@ FBDevProbe(DriverPtr drv, int flags) + + dev = xf86FindOptionValue(devSections[i]->options,"fbdev"); + if (devSections[i]->busID) { +-#ifndef XSERVER_LIBPCIACCESS ++#if 0 + if (xf86ParsePciBusString(devSections[i]->busID,&bus,&device, + &func)) { + if (!xf86CheckPciSlot(bus,device,func)) +@@ -358,7 +358,7 @@ FBDevProbe(DriverPtr drv, int flags) + if (fbdevHWProbe(NULL,dev,NULL)) { + pScrn = NULL; + if (isPci) { +-#ifndef XSERVER_LIBPCIACCESS ++#if 0 + /* XXX what about when there's no busID set? */ + int entity; + +@@ -444,6 +444,7 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags) + fPtr->pEnt = xf86GetEntityInfo(pScrn->entityList[0]); + + #ifndef XSERVER_LIBPCIACCESS ++#if 0 + pScrn->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT; + /* XXX Is this right? Can probably remove RAC_FB */ + pScrn->racIoFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT; +@@ -454,6 +455,7 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags) + "xf86RegisterResources() found resource conflicts\n"); + return FALSE; + } ++#endif + #else + if (fPtr->pEnt->location.type == BUS_PCI) + pci_dev = fPtr->pEnt->location.id.pci; +@@ -1010,7 +1012,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL) + fPtr->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = FBDevCloseScreen; + +-#if XV ++#ifdef XV + { + XF86VideoAdaptorPtr *ptr; + diff --git a/recipes/xf86-video-fbdev b/recipes/xf86-video-fbdev new file mode 100644 index 00000000..003da009 --- /dev/null +++ b/recipes/xf86-video-fbdev @@ -0,0 +1,24 @@ +name=xf86-video-fbdev +revision=1 +from_source=xf86-video-fbdev +imagedeps="gcc" +hostdeps="gcc-cross binutils-cross pkgconfig automake autoconf util-macros libtool" +deps="mlibc xorg-server" + +configure() { + + SYSROOT=${sysroot_dir} ${source_dir}/configure --prefix=${prefix} --host=x86_64-astral --disable-static --disable-pciaccess + +} + +build() { + + make -j${parallelism} + +} + +install() { + + make DESTDIR=${dest_dir} install + +} diff --git a/source-recipes/xf86-video-fbdev b/source-recipes/xf86-video-fbdev new file mode 100644 index 00000000..71788515 --- /dev/null +++ b/source-recipes/xf86-video-fbdev @@ -0,0 +1,9 @@ +name=xf86-video-fbdev +version=0.5.0 +source_method=tarball +tarball_url="https://www.x.org/pub/individual/driver/xf86-video-fbdev-${version}.tar.bz2" +tarball_sha512=a +hostdeps="autoconf automake libtool pkgconfig util-macros" +regenerate() { + autoreconf -fvi +}