vanhofen
2 years ago
4 changed files with 145 additions and 0 deletions
@ -0,0 +1,21 @@ |
|||
--- a/src/serdisp_specific_framebuffer.c
|
|||
+++ b/src/serdisp_specific_framebuffer.c
|
|||
@@ -312,13 +312,15 @@ serdisp_t* serdisp_framebuffer_setup(con
|
|||
|
|||
if (fb_success) { |
|||
/* check if colour mode is supported */ |
|||
- if (! (vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
|
|||
+ if (! (vinfo.bits_per_pixel == 1 ||vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
|
|||
sd_error(SERDISP_ERUNTIME, "unsupported colour depth (%d)", vinfo.bits_per_pixel); |
|||
fb_success = 0; |
|||
} |
|||
} |
|||
-
|
|||
- dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
|
|||
+ if (vinfo.bits_per_pixel == 1)
|
|||
+ dd->scrbuf_size = (vinfo.xres * vinfo.yres) / 8;
|
|||
+ else
|
|||
+ dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
|
|||
|
|||
if (fb_success) { |
|||
/* map framebuffer device to memory */ |
@ -0,0 +1,101 @@ |
|||
--- a/Makefile.in
|
|||
+++ b/Makefile.in
|
|||
@@ -44,8 +44,8 @@ all:
|
|||
done && test -z "$$fail" |
|||
|
|||
install: |
|||
- $(top_srcdir)/mkinstalldirs $(libdir)/pkgconfig
|
|||
- $(INSTALL_DATA) serdisplib.pc $(libdir)/pkgconfig/
|
|||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
|
|||
+ $(INSTALL_DATA) serdisplib.pc $(DESTDIR)$(libdir)/pkgconfig/
|
|||
@for dir in ${subdirs}; do \ |
|||
(cd $(srcdir) && cd $$dir && $(MAKE) install) \ |
|||
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ |
|||
--- a/server/Makefile.in
|
|||
+++ b/server/Makefile.in
|
|||
@@ -102,9 +102,9 @@ distclean: clean
|
|||
|
|||
|
|||
install: $(PROGRAMS) |
|||
- $(top_srcdir)/mkinstalldirs $(bindir)
|
|||
- $(top_srcdir)/mkinstalldirs $(sbindir)
|
|||
- $(top_srcdir)/mkinstalldirs $(sysconfdir)
|
|||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
|
|||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
|
|||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
|
|||
list='$(PROGRAMS_SBIN)'; \ |
|||
for prog in $$list; do \ |
|||
$(INSTALL_PROGRAM) $$prog $(sbindir)/ ; \ |
|||
--- a/src/Makefile.in
|
|||
+++ b/src/Makefile.in
|
|||
@@ -28,7 +28,7 @@ includedir = @includedir@
|
|||
datarootdir = @datarootdir@ |
|||
|
|||
CC=@CC@ |
|||
-AR=@AR@ -r
|
|||
+AR=@AR@
|
|||
LN_S=@LN_S@ |
|||
INSTALL=@INSTALL@ |
|||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
|||
@@ -184,14 +184,14 @@ programs: $(PROGRAMS)
|
|||
$(CC) $(CFLAGS) $(DEFINES) -c $< |
|||
|
|||
$(LIB_DIR)/$(LIB_STATIC): $(LIB_OBJECTS) |
|||
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/lib
|
|||
- $(AR) $(LIB_DIR)/$(LIB_STATIC) $(LIB_OBJECTS)
|
|||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(top_srcdir)/lib
|
|||
+ $(AR) -r -- $(LIB_DIR)/$(LIB_STATIC) $(LIB_OBJECTS)
|
|||
|
|||
$(LIB_DIR)/$(LIB_SHARED): $(LIB_OBJECTS) |
|||
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/lib
|
|||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(top_srcdir)/lib
|
|||
$(CC) -fPIC -shared $(SONAME_FLAG) -o $(LIB_DIR)/$(LIB_SHARED) $(LIB_OBJECTS) $(LDFLAGS) $(EXTRA_LIBS) |
|||
- cd $(LIB_DIR) && $(LN_S) -f $(LIB_SHARED) lib$(LIB_NAME).so.$(VERSION_MAJOR)
|
|||
- cd $(LIB_DIR) && $(LN_S) -f lib$(LIB_NAME).so.$(VERSION_MAJOR) lib$(LIB_NAME).so
|
|||
+ cd $(DESTDIR)$(LIB_DIR) && $(LN_S) -f $(LIB_SHARED) lib$(LIB_NAME).so.$(VERSION_MAJOR)
|
|||
+ cd $(DESTDIR)$(LIB_DIR) && $(LN_S) -f lib$(LIB_NAME).so.$(VERSION_MAJOR) lib$(LIB_NAME).so
|
|||
|
|||
testserdisp: $(LIB_DIR)/$(LIB_STATIC) $(OBJECTS) |
|||
$(CC) -o testserdisp $(OBJECTS) $(LIB_SERDISP) $(EXTRA_LIBS_STATIC) |
|||
@@ -204,20 +204,20 @@ distclean: clean
|
|||
/bin/rm -f Makefile |
|||
|
|||
install: $(LIB_DIR)/$(LIB_SHARED) $(LIB_DIR)/$(LIB_STATIC) |
|||
- $(top_srcdir)/mkinstalldirs $(bindir)
|
|||
- $(top_srcdir)/mkinstalldirs $(libdir)
|
|||
- $(top_srcdir)/mkinstalldirs $(includedir)
|
|||
- $(top_srcdir)/mkinstalldirs $(includedir)/serdisplib
|
|||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
|
|||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
|
|||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(includedir)
|
|||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(includedir)/serdisplib
|
|||
|
|||
- $(INSTALL_PROGRAM) $(PROGRAMS) $(bindir)/
|
|||
- $(INSTALL_PROGRAM) $(LIB_DIR)/$(LIB_SHARED) $(libdir)/
|
|||
- $(INSTALL_DATA) $(LIB_DIR)/$(LIB_STATIC) $(libdir)/
|
|||
+ $(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(bindir)/
|
|||
+ $(INSTALL_PROGRAM) $(LIB_DIR)/$(LIB_SHARED) $(DESTDIR)$(libdir)/
|
|||
+ $(INSTALL_DATA) $(LIB_DIR)/$(LIB_STATIC) $(DESTDIR)$(libdir)/
|
|||
list='$(LIB_HEADERFILES)'; \ |
|||
for headerfile in $$list; do \ |
|||
- $(INSTALL_DATA) ../include/serdisplib/$$headerfile $(includedir)/serdisplib/ ; \
|
|||
+ $(INSTALL_DATA) ../include/serdisplib/$$headerfile $(DESTDIR)$(includedir)/serdisplib/ ; \
|
|||
done |
|||
- cd $(libdir) && $(LN_S) -f $(LIB_SHARED) lib$(LIB_NAME).so.$(VERSION_MAJOR)
|
|||
- cd $(libdir) && $(LN_S) -f lib$(LIB_NAME).so.$(VERSION_MAJOR) lib$(LIB_NAME).so
|
|||
+ cd $(DESTDIR)$(libdir) && $(LN_S) -f $(LIB_SHARED) lib$(LIB_NAME).so.$(VERSION_MAJOR)
|
|||
+ cd $(DESTDIR)$(libdir) && $(LN_S) -f lib$(LIB_NAME).so.$(VERSION_MAJOR) lib$(LIB_NAME).so
|
|||
|
|||
uninstall: |
|||
-/bin/rm -f $(libdir)/libserdisp* |
|||
--- a/tools/Makefile.in
|
|||
+++ b/tools/Makefile.in
|
|||
@@ -151,7 +151,7 @@ distclean: clean
|
|||
install: $(PROGRAMS) |
|||
list='$(PROGRAMS)'; \ |
|||
for prog in $$list; do \ |
|||
- $(INSTALL_PROGRAM) $$prog $(bindir)/ ; \
|
|||
+ $(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir)/ ; \
|
|||
done |
|||
|
|||
uninstall: $(PROGRAMS) |
@ -0,0 +1,22 @@ |
|||
################################################################################
|
|||
#
|
|||
# serdisplib
|
|||
#
|
|||
################################################################################
|
|||
|
|||
SERDISPLIB_VERSION = 2.02 |
|||
SERDISPLIB_DIR = serdisplib-$(SERDISPLIB_VERSION) |
|||
SERDISPLIB_SOURCE = serdisplib-$(SERDISPLIB_VERSION).tar.gz |
|||
SERDISPLIB_SITE = https://sourceforge.net/projects/serdisplib/files/serdisplib/$(SERDISPLIB_VERSION) |
|||
|
|||
SERDISPLIB_DEPENDS = libusb-compat |
|||
|
|||
SERDISPLIB_CONF_OPTS = \
|
|||
--bindir=$(REMOVE_bindir) \
|
|||
--disable-libSDL \
|
|||
--disable-libusb \
|
|||
--disable-libdlo \
|
|||
--with-drivers='framebuffer' |
|||
|
|||
serdisplib: | $(TARGET_DIR) |
|||
$(call autotools-package) |
Loading…
Reference in new issue