HxC floppy emulator software update

- Now distributed in a single git repository
- We have FLTK now, so also build the GUI
- All put into a single package for now since no one else uses the libraries.
This commit is contained in:
PulkoMandy
2024-03-03 16:57:09 +01:00
parent 73a450b33a
commit 7e22a8ab62
8 changed files with 224 additions and 300 deletions

View File

@@ -3,31 +3,34 @@ DESCRIPTION="Tools for manipulating and converting floppy disk images in the
HFE format used by the HxC floppy emulator, and driving the USB version of the
emulator."
HOMEPAGE="https://hxc2001.com/"
COPYRIGHT="2006-2016 Jean-François Del Nero"
COPYRIGHT="2006-2024 Jean-François Del Nero"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/jfdelnero/HxCFloppyEmulator_cmdline/archive/HxCFloppyEmulator_cmdline_V2_0_0_0.tar.gz"
CHECKSUM_SHA256="db022b6c280b515c5c413903d885caa48097d67347eda017341beef8859e097b"
SOURCE_DIR="HxCFloppyEmulator_cmdline-HxCFloppyEmulator_cmdline_V2_0_0_0"
PATCHES="hxcfloppyemulator_cmdline-2.0.0.0.patchset"
SOURCE_URI="https://github.com/jfdelnero/HxCFloppyEmulator/archive/refs/tags/HxCFloppyEmulator_V2_15_2_3.tar.gz"
CHECKSUM_SHA256="0e402ff14caf818d44152193ee19017abb19846cda505f5138c2d44fdaa8a581"
SOURCE_DIR="HxCFloppyEmulator-HxCFloppyEmulator_V2_15_2_3"
PATCHES="hxcfloppyemulator-2.15.2.3.patchset"
ARCHITECTURES="?all !x86_gcc2"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
hxcfloppyemulator_cmdline$secondaryArchSuffix = $portVersion
hxcfloppyemulator$secondaryArchSuffix = $portVersion
cmd:hxcfe$secondaryArchSuffix
cmd:hxcfloppyemulator$secondaryArchSuffix
lib:libhxcfe$secondaryArchSuffix
lib:libusbhxcfe$secondaryArchSuffix
devel:libhxcfe$secondaryArchSuffix
devel:libusbhxcfe$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libhxcfe$secondaryArchSuffix
lib:libusbhxcfe$secondaryArchSuffix
lib:libfltk$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libhxcfe$secondaryArchSuffix
devel:libusbhxcfe$secondaryArchSuffix
devel:libfltk$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
@@ -43,5 +46,9 @@ BUILD()
INSTALL()
{
mkdir -p $binDir
cp build/hxcfe $binDir
mkdir -p $libDir
cp build/hxcfe build/hxcfloppyemulator $binDir
cp build/*.so $libDir
prepareInstalledDevelLibs libhxcfe libusbhxcfe
}

View File

@@ -0,0 +1,205 @@
From 57d8ceaeda256c59ff8d5eb6363f2015147067ca Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Sun, 3 Mar 2024 16:50:13 +0100
Subject: Remove need for hardlinks
diff --git a/HxCFloppyEmulator_cmdline/build/Makefile b/HxCFloppyEmulator_cmdline/build/Makefile
index c754197..c09cd1a 100644
--- a/HxCFloppyEmulator_cmdline/build/Makefile
+++ b/HxCFloppyEmulator_cmdline/build/Makefile
@@ -84,10 +84,10 @@ hxcfe: hxcfe.o utils.o ../../build/libhxcadaptor.a $(LIBHXCFE) $(LIBUSBHXCFE)
cp $@ ../../build
$(LIBHXCFE): ../../build/$(LIBHXCFE)
- ln ../../build/$(LIBHXCFE) $(LIBHXCFE)
+ ln -s ../../build/$(LIBHXCFE) $(LIBHXCFE)
$(LIBUSBHXCFE): ../../build/$(LIBUSBHXCFE)
- ln ../../build/$(LIBUSBHXCFE) $(LIBUSBHXCFE)
+ ln -s ../../build/$(LIBUSBHXCFE) $(LIBUSBHXCFE)
hxcfe.o: ../sources/hxcfe.c
$(CC) -o $@ -c $< $(CFLAGS)
--
2.43.2
From 4e14fc340b866f7326ef3de922aa623bff9c4fe7 Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Sun, 3 Mar 2024 16:50:36 +0100
Subject: Use system-provided fltk
diff --git a/HxCFloppyEmulator_software/build/Makefile b/HxCFloppyEmulator_software/build/Makefile
index 7be6100..6bac6a2 100644
--- a/HxCFloppyEmulator_software/build/Makefile
+++ b/HxCFloppyEmulator_software/build/Makefile
@@ -53,6 +53,10 @@ ifeq ($(TARGET), FreeBSD)
LDFLAGS += -lc -lm -ldl -lpthread -Wl,-rpath=. -Wl,-Map,foo.map
endif
+ifeq ($(TARGET), Haiku)
+ LDFLAGS += -lnetwork -lfltk
+endif
+
ifeq ($(TARGET), Linux)
LDFLAGS += -lc -lm -ldl -lpthread -Wl,-rpath=. -Wl,-Map,foo.map
endif
@@ -101,74 +105,11 @@ GUI = main_gui.o msg_txt.o gui_strings.o about_gui.o batch_converter_window.o fl
filesystem_generator_window.o cb_edittool_window.o edittool_window.o floppy_streamer_window.o cb_floppy_streamer_window.o fl_dnd_box.o
MICROINTRO = microintro.o lzw.o pack.o rle.o hxcmod.o
-FLTKLIB = $(BASEDIR)/thirdpartylibs/fltk/fltk-1.x.x/lib/libfltk.a $(BASEDIR)/thirdpartylibs/fltk/fltk-1.x.x/lib/libfltk_images.a
all:
- $(MAKE) fltk
$(MAKE) DATA_FILES
$(MAKE) $(EXEC)
-fltk:
- cd ../sources/thirdpartylibs/fltk/ && bash ./prepare_fltk.sh $(FLTK1_4)
-ifeq ($(TARGET), mingw32)
- cd ../sources/thirdpartylibs/fltk/fltk-1.x.x/ && export LDFLAGS='-static-libstdc++ -static-libgcc' && ./configure --host=i686-w64-mingw32 --prefix=/usr/share/mingw-w64
- $(MAKE) -C ../sources/thirdpartylibs/fltk/fltk-1.x.x/ DIRS=src CC=i686-w64-mingw32-gcc CPP=i686-w64-mingw32-g++
-else ifeq ($(TARGET), mingw64)
- cd ../sources/thirdpartylibs/fltk/fltk-1.x.x/ && export LDFLAGS='-static-libstdc++ -static-libgcc' && ./configure --host=x86_64-w64-mingw32 --prefix=/usr/share/mingw-w64
- $(MAKE) -C ../sources/thirdpartylibs/fltk/fltk-1.x.x/ DIRS=src CC=x86_64-w64-mingw32-gcc CPP=x86_64-w64-mingw32-g++
-else ifeq ($(TARGET), Darwin)
-ifneq (,$(findstring arm64,$(MACOSX_ARCH)))
- cd ../sources/thirdpartylibs/fltk && \
- cp -a fltk-1.x.x fltk-1.x.x-arm64 && \
- cd fltk-1.x.x-arm64 && \
- export CFLAGS='-mmacosx-version-min=11 -arch arm64' && export CXXFLAGS='-mmacosx-version-min=11 -arch arm64' && export LDFLAGS='-mmacosx-version-min=11 -arch arm64' && ./configure --host=arm-apple-darwin
- $(MAKE) -C ../sources/thirdpartylibs/fltk/fltk-1.x.x-arm64/ DIRS=src
-endif
-ifneq (,$(findstring x86_64,$(MACOSX_ARCH)))
- cd ../sources/thirdpartylibs/fltk && \
- cp -a fltk-1.x.x fltk-1.x.x-x86_64 && \
- cd fltk-1.x.x-x86_64 && \
- export CFLAGS='-mmacosx-version-min=10.9 -arch x86_64' && export CXXFLAGS='-mmacosx-version-min=10.9 -arch x86_64' && export LDFLAGS='-mmacosx-version-min=10.9 -arch x86_64' && ./configure --host=x86_64-apple-darwin
- $(MAKE) -C ../sources/thirdpartylibs/fltk/fltk-1.x.x-x86_64/ DIRS=src
-endif
-ifneq (,$(findstring x86_64,$(MACOSX_ARCH)))
-ifneq (,$(findstring arm64,$(MACOSX_ARCH)))
- cd ../sources/thirdpartylibs/fltk && \
- lipo fltk-1.x.x-x86_64/lib/libfltk.a fltk-1.x.x-arm64/lib/libfltk.a -create -output fltk-1.x.x/lib/libfltk.a && \
- lipo fltk-1.x.x-x86_64/lib/libfltk_forms.a fltk-1.x.x-arm64/lib/libfltk_forms.a -create -output fltk-1.x.x/lib/libfltk_forms.a && \
- lipo fltk-1.x.x-x86_64/lib/libfltk_gl.a fltk-1.x.x-arm64/lib/libfltk_gl.a -create -output fltk-1.x.x/lib/libfltk_gl.a && \
- lipo fltk-1.x.x-x86_64/lib/libfltk_images.a fltk-1.x.x-arm64/lib/libfltk_images.a -create -output fltk-1.x.x/lib/libfltk_images.a
- -cd ../sources/thirdpartylibs/fltk && \
- cp fltk-1.x.x-x86_64/FL/abi-version.h fltk-1.x.x/FL/abi-version.h
- -cd ../sources/thirdpartylibs/fltk && \
- cp fltk-1.x.x-x86_64/FL/fl_config.h fltk-1.x.x/FL/fl_config.h
-else
- cd ../sources/thirdpartylibs/fltk && \
- cp fltk-1.x.x-x86_64/lib/libfltk.a fltk-1.x.x/lib/libfltk.a && \
- cp fltk-1.x.x-x86_64/lib/libfltk_forms.a fltk-1.x.x/lib/libfltk_forms.a && \
- cp fltk-1.x.x-x86_64/lib/libfltk_gl.a fltk-1.x.x/lib/libfltk_gl.a && \
- cp fltk-1.x.x-x86_64/lib/libfltk_images.a fltk-1.x.x/lib/libfltk_images.a
- -cd ../sources/thirdpartylibs/fltk && \
- cp fltk-1.x.x-x86_64/FL/abi-version.h fltk-1.x.x/FL/abi-version.h
- -cd ../sources/thirdpartylibs/fltk && \
- cp fltk-1.x.x-x86_64/FL/fl_config.h fltk-1.x.x/FL/fl_config.h
-endif
-else
-ifneq (,$(findstring arm64,$(MACOSX_ARCH)))
- cd ../sources/thirdpartylibs/fltk && \
- cp fltk-1.x.x-arm64/lib/libfltk.a fltk-1.x.x/lib/libfltk.a && \
- cp fltk-1.x.x-arm64/lib/libfltk_forms.a fltk-1.x.x/lib/libfltk_forms.a && \
- cp fltk-1.x.x-arm64/lib/libfltk_gl.a fltk-1.x.x/lib/libfltk_gl.a && \
- cp fltk-1.x.x-arm64/lib/libfltk_images.a fltk-1.x.x/lib/libfltk_images.a
- -cd ../sources/thirdpartylibs/fltk && \
- cp fltk-1.x.x-arm64/FL/abi-version.h fltk-1.x.x/FL/abi-version.h
- -cd ../sources/thirdpartylibs/fltk && \
- cp fltk-1.x.x-arm64/FL/fl_config.h fltk-1.x.x/FL/fl_config.h
-endif
-endif
-else
- $(MAKE) -C ../sources/thirdpartylibs/fltk/fltk-1.x.x/ DIRS=src
-endif
DATA_FILES: bmptoh
cd $(BASEDIR)/gui/microintro/data/ && ../converttools/bmptob8/bmptoh sob.bmp -BMP8P
@@ -186,19 +127,19 @@ DATA_FILES: bmptoh
cd $(BASEDIR)/gui/microintro/data/ && ../converttools/bmptob8/bmptoh nao_gabber_astro.mod -DATA
cd $(BASEDIR)/gui/microintro/data/ && ../converttools/bmptob8/bmptoh ../../../../COPYING_FULL -DATA
-HxCFloppyEmulator.exe: win32_hxcfloppy_res.o main.o utils.o $(GUI) $(MICROINTRO) loader.o soft_cfg_file.o fileselector.o $(FLTKLIB) $(LIBHXCFE) $(LIBUSBHXCFE) ../../build/libhxcadaptor.a
+HxCFloppyEmulator.exe: win32_hxcfloppy_res.o main.o utils.o $(GUI) $(MICROINTRO) loader.o soft_cfg_file.o fileselector.o $(LIBHXCFE) $(LIBUSBHXCFE) ../../build/libhxcadaptor.a
$(CPP) -o $@ $^ $(LDFLAGS)
cp $@ ../../build
-hxcfloppyemulator: main.o utils.o $(GUI) $(MICROINTRO) loader.o soft_cfg_file.o fileselector.o $(FLTKLIB) $(LIBHXCFE) $(LIBUSBHXCFE) ../../build/libhxcadaptor.a
+hxcfloppyemulator: main.o utils.o $(GUI) $(MICROINTRO) loader.o soft_cfg_file.o fileselector.o $(LIBHXCFE) $(LIBUSBHXCFE) ../../build/libhxcadaptor.a
$(CPP) -o $@ $^ $(LDFLAGS)
cp $@ ../../build
$(LIBHXCFE): ../../build/$(LIBHXCFE)
- ln ../../build/$(LIBHXCFE) $(LIBHXCFE)
+ ln -s ../../build/$(LIBHXCFE) $(LIBHXCFE)
$(LIBUSBHXCFE): ../../build/$(LIBUSBHXCFE)
- ln ../../build/$(LIBUSBHXCFE) $(LIBUSBHXCFE)
+ ln -s ../../build/$(LIBUSBHXCFE) $(LIBUSBHXCFE)
win32_hxcfloppy_res.o: $(BASEDIR)/win32/hxcfloppy.rc
$(RESC) $< $@
--
2.43.2
From f9cf6c171a2949f4fb49e5d045c7eb65ca67e3c5 Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Sun, 3 Mar 2024 16:50:57 +0100
Subject: Disable nonstandard pthread function calls
diff --git a/libhxcadaptor/sources/libhxcadaptor.c b/libhxcadaptor/sources/libhxcadaptor.c
index b7b4b8b..bde6851 100644
--- a/libhxcadaptor/sources/libhxcadaptor.c
+++ b/libhxcadaptor/sources/libhxcadaptor.c
@@ -325,6 +325,7 @@ int hxc_createthread(HXCFE* floppycontext,void* hwcontext,THREADFUNCTION thread,
pthread_attr_init(&threadattrib);
+#ifndef __HAIKU__
pthread_attr_setinheritsched(&threadattrib, PTHREAD_EXPLICIT_SCHED);
if(priority)
@@ -337,6 +338,7 @@ int hxc_createthread(HXCFE* floppycontext,void* hwcontext,THREADFUNCTION thread,
pthread_attr_setschedpolicy(&threadattrib,SCHED_OTHER);
param.sched_priority = sched_get_priority_max(SCHED_OTHER);
}
+#endif
/* set the new scheduling param */
pthread_attr_setschedparam (&threadattrib, &param);
@@ -745,4 +747,4 @@ int hxc_ram_fclose(FILE *f,HXCRAMFILE * rf)
}
return 0;
-};
\ No newline at end of file
+};
diff --git a/libusbhxcfe/sources/ftdi.c b/libusbhxcfe/sources/ftdi.c
index a25eb65..69d8fca 100644
--- a/libusbhxcfe/sources/ftdi.c
+++ b/libusbhxcfe/sources/ftdi.c
@@ -251,11 +251,13 @@ int32_t createlistenerthread(RDTHREADFUNCTION thread,int32_t priority,ftdi_conte
//pthread_attr_create(&threadattrib);
pthread_attr_init(&threadattrib);
+#ifndef __HAIKU__
pthread_attr_setinheritsched(&threadattrib,PTHREAD_EXPLICIT_SCHED);
//pthread_attr_setsched(&threadattrib,SCHED_FIFO);
//pthread_attr_setprio(&threadattrib,4);
pthread_attr_setschedpolicy(&threadattrib,SCHED_FIFO);
+#endif
param.sched_priority = sched_get_priority_max(SCHED_FIFO) ;
/* set the new scheduling param */
pthread_attr_setschedparam (&threadattrib, &param);
--
2.43.2

View File

@@ -1,35 +0,0 @@
From 881f818c3765de2d90e463c294b7975ee8147d36 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 27 Feb 2016 09:32:56 +0100
Subject: Haiku hacks
diff --git a/build/Makefile b/build/Makefile
index a8b417c..1b8e939 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -9,6 +9,10 @@ LDFLAGS=-lc -lm -ldl -lpthread
LIBHXCFE = libhxcfe.so
LIBUSBHXCFE = libusbhxcfe.so
+ifeq ($(UNAME), Haiku)
+LDFLAGS=
+endif
+
ifeq ($(UNAME), Darwin)
CFLAGS += -arch i386
LDFLAGS += -arch i386
@@ -29,8 +33,8 @@ EXEC=hxcfe
all: $(EXEC)
-hxcfe: hxcfe.o ../../../build/libhxcadaptor.a $(LIBHXCFE) $(LIBUSBHXCFE)
- $(CC) -o $@ $^ $(LDFLAGS)
+hxcfe: hxcfe.o
+ $(CC) -o $@ -lhxcadaptor -lhxcfe -lusbhxcfe $^ $(LDFLAGS)
cp $@ ../../../build
$(LIBHXCFE): ../../../build/$(LIBHXCFE)
--
2.7.0

View File

@@ -1,90 +0,0 @@
SUMMARY="Manage floppy disk image formats"
DESCRIPTION="The HxC floppy emulator is a device that replaces a floppy drive \
and allows to use an SD card or USB drive instead of old floppies. This library \
allows to manage floppy image in the HFE format used by the emulator, as well \
as several other common floppy image formats."
HOMEPAGE="https://sourceforge.net/projects/hxcfloppyemu/"
COPYRIGHT="2006-2016 Jean-François Del Nero"
LICENSE="GNU GPL v3"
REVISION="2"
SOURCE_URI="https://github.com/jfdelnero/libhxcfe/archive/libhxcfe_V2_4_6_0.tar.gz"
CHECKSUM_SHA256="af37d7fb7cd7634af287b8795bf22d6511097cb8666b82baaa05cf6c646f7b7e"
SOURCE_DIR="libhxcfe-libhxcfe_V2_4_6_0"
SOURCE_URI_2="https://github.com/jfdelnero/libhxcadaptor/archive/libhxcadaptor_V2_0_0_5.tar.gz"
CHECKSUM_SHA256_2="2777d2d86a93113dfc3502e3fb7f2f179aa84a94712947c68374c379336185ad"
SOURCE_DIR_2="libhxcadaptor-libhxcadaptor_V2_0_0_5"
SOURCE_URI_3="https://github.com/jfdelnero/libusbhxcfe/archive/libusbhxcfe_V2_0_0_4.tar.gz"
CHECKSUM_SHA256_3="41c16f6539ec6cd6da6c76c94945092d440be4870ff81f308e946e6dfe10e866"
SOURCE_DIR_3="libusbhxcfe-libusbhxcfe_V2_0_0_4"
PATCHES="libhxcfe-$portVersion.patchset"
PATCHES_2="libhxcadaptor-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
libhxcfe$secondaryArchSuffix = $portVersion
lib:libhxcfe$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libhxcfe${secondaryArchSuffix}_devel = $portVersion
devel:libhxcadaptor$secondaryArchSuffix
devel:libhxcfe$secondaryArchSuffix
"
REQUIRES_devel="
haiku${secondaryArchSuffix}_devel
libhxcfe$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:dos2unix
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
# Prepare directories so the sub-projects can see each other…
mkdir -p ../../libhxcadaptor
ln -sf ../sources-2/libhxcadaptor-libhxcadaptor_V2_0_0_5 ../../libhxcadaptor/trunk
mkdir -p ../../libusbhxcfe
ln -sf ../sources-3/libusbhxcfe-libusbhxcfe_V2_0_0_4 ../../libusbhxcfe/trunk
mkdir -p ../../libhxcfe
ln -sf ../sources/libhxcfe-libhxcfe_V2_4_6_0 ../../libhxcfe/trunk
# Prepare the output dir where all .a files will be put…
mkdir -p ../../build
# Build platform abstraction layer…
pushd ../../sources-2/libhxcadaptor-libhxcadaptor_V2_0_0_5/build
make $jobArgs
popd
# Build floppy image management library…
cd build
make $jobArgs
}
INSTALL()
{
mkdir -p $libDir $includeDir $includeDir/tracks
cp ../../build/*.* $libDir
cp ../../sources-2/*/sources/*.h $includeDir
cp sources/*.h $includeDir
cp sources/tracks/*.h $includeDir/tracks/
prepareInstalledDevelLibs \
libhxcfe libhxcadaptor
packageEntries devel \
$developDir
}

View File

@@ -1,25 +0,0 @@
From df5201e4f4eaec5f4012bf5d63ac1680d84cc836 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 27 Feb 2016 09:18:23 +0100
Subject: Fix Haiku build.
diff --git a/sources/libhxcadaptor.c b/sources/libhxcadaptor.c
index 253f7a4..c64906b 100644
--- a/sources/libhxcadaptor.c
+++ b/sources/libhxcadaptor.c
@@ -241,9 +241,11 @@ int hxc_createthread(HXCFLOPPYEMULATOR* floppycontext,void* hwcontext,THREADFUNC
pthread_attr_init(&threadattrib);
+#ifndef __HAIKU__
pthread_attr_setinheritsched(&threadattrib, PTHREAD_EXPLICIT_SCHED);
pthread_attr_setschedpolicy(&threadattrib,SCHED_FIFO);
+#endif
param.sched_priority = sched_get_priority_max(SCHED_FIFO);
/* set the new scheduling param */
pthread_attr_setschedparam (&threadattrib, &param);
--
2.7.0

View File

@@ -1,24 +0,0 @@
From a2586c9c4ebe44562714a1e9c8ea3cefea4de0e6 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 26 Feb 2016 21:52:58 +0100
Subject: Add Haiku support.
diff --git a/build/Makefile b/build/Makefile
index 2aacd3a..caffc11 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -22,6 +22,10 @@ ifeq ($(UNAME), Linux)
CFLAGS += -fPIC
endif
+ifeq ($(UNAME), Haiku)
+LDFLAGS= -g -shared
+endif
+
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
LDFLAGS= -g -shared -lc -lm -ldl
EXEC=libhxcfe.dll
--
2.7.0

View File

@@ -1,62 +0,0 @@
SUMMARY="CPLD based USB HxC Floppy Emulator HAL library"
DESCRIPTION="The USB HxC floppy emulator is a device that connects to a modern
computer with USB on one side and emulates a Shugart floppy drive on the other
side. It allows transferring files from and to old computers in a simple way
and without using obsolete storage media."
HOMEPAGE="https://hxc2001.com"
COPYRIGHT="2006-2016 JEan-François Del Nero"
LICENSE="GNU GPL v3"
REVISION="2"
SOURCE_URI="https://github.com/jfdelnero/libusbhxcfe/archive/libusbhxcfe_V2_0_0_4.tar.gz"
CHECKSUM_SHA256="41c16f6539ec6cd6da6c76c94945092d440be4870ff81f308e946e6dfe10e866"
SOURCE_DIR="libusbhxcfe-libusbhxcfe_V2_0_0_4"
PATCHES="libusbhxcfe-2.0.0.4.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
libusbhxcfe$secondaryArchSuffix = $portVersion
lib:libusbhxcfe$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libusbhxcfe${secondaryArchSuffix}_devel = $portVersion
devel:libusbhxcfe$secondaryArchSuffix
"
REQUIRES_devel="
haiku${secondaryArchSuffix}_devel
libusbhxcfe$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libhxcfe$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
cd build
make $jobArgs
}
INSTALL()
{
mkdir -p $libDir
mkdir -p $includeDir
cp build/*.so $libDir
cp sources/*.h $includeDir
prepareInstalledDevelLibs \
libusbhxcfe
packageEntries devel \
$developDir
}

View File

@@ -1,52 +0,0 @@
From e61db96bc5ba7ed32d455f1408b46b8a93f499c6 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 27 Feb 2016 09:36:52 +0100
Subject: Fix Haiku build.
diff --git a/build/Makefile b/build/Makefile
index 9d37914..dcde088 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -16,6 +16,10 @@ ifeq ($(UNAME), Linux)
CFLAGS += -fPIC
endif
+ifeq ($(UNAME), Haiku)
+LDFLAGS= -g -shared
+endif
+
ifeq ($(UNAME), Darwin)
CFLAGS += -arch i386 -mmacosx-version-min=10.5
LDFLAGS += -arch i386 -dynamiclib -current_version 2.0 -install_name @executable_path/../Frameworks/libusbhxcfe.dylib -mmacosx-version-min=10.5
--
2.7.0
From 439fe6a0cc1121e347312ff2212af83037ee95ba Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 27 Feb 2016 10:04:16 +0100
Subject: Haiku hacks.
diff --git a/sources/ftdi.c b/sources/ftdi.c
index 52874cc..6c53666 100644
--- a/sources/ftdi.c
+++ b/sources/ftdi.c
@@ -249,11 +249,13 @@ int createlistenerthread(RDTHREADFUNCTION thread,int priority,ftdi_context ftdih
//pthread_attr_create(&threadattrib);
pthread_attr_init(&threadattrib);
+#ifndef __HAIKU__
pthread_attr_setinheritsched(&threadattrib,PTHREAD_EXPLICIT_SCHED);
//pthread_attr_setsched(&threadattrib,SCHED_FIFO);
//pthread_attr_setprio(&threadattrib,4);
pthread_attr_setschedpolicy(&threadattrib,SCHED_FIFO);
+#endif
param.sched_priority = sched_get_priority_max(SCHED_FIFO) ;
/* set the new scheduling param */
pthread_attr_setschedparam (&threadattrib, &param);
--
2.7.0