Other IceWM fork

A developer who goes by name Bbidulock has forked IceWM. Fixed bugs, added new features. The old branch started by original developer, Marko Macek is inactive for years.

I am trying to compile it for FreeBSD from source, but there are problems. Has anyone else tried ?
 
Why don't you start with the original port x11-wm/icewm and modify it to build the new fork? Looking at that port I see there are a few FreeBSD specific patches in the files/ directory. I'm betting you need some of them in order to get it to build. They may need to be modified to apply cleanly to the new source though.
 
Why don't you start with the original port x11-wm/icewm and modify it to build the new fork? Looking at that port I see there are a few FreeBSD specific patches in the files/ directory. I'm betting you need some of them in order to get it to build. They may need to be modified to apply cleanly to the new source though.

Sounds like a good idea. I'll see what I can do. Although my C and C++ skills are rusty, last time I have written C++ was in 2002, only Java, PHP and Python after that.
 
Depending on the stuff that's changed it may just work, provided the changes didn't impact anything for the build or configuration. But it's definitely worth a shot, at the very least it'll give you a good starting point to work from.
 
There are some useful configure switches, which I figured out myself. However, struct glob_pattern_p is not in glob.h, and it seems to be glibc/Linux specific. At this point I don't know how to proceed.
 
There are some useful configure switches, which I figured out myself. However, struct glob_pattern_p is not in glob.h, and it seems to be glibc/Linux specific. At this point I don't know how to proceed.
You have two bad options. One is to run Linux as the author of IceWM wants you to do. The second one is that you fork the fork and fix non portability issues. If the guy who did the original fork was competent and serious about the quality she/he would not make such beginner mistake.
 
Actually I have Slackware Linux installed along FreeBSD. It is not such a bad option. One of the goals of Slackware project is to preserve UNIX compatibility, so Slackware often goes against strange, "modern" ideas in Linux community. As long as there are "old school" Linux distributions, I will keep using it. If they all go away, I will ditch Linux for good. I'd rather run Windows than use things like systemd, avahi or pulseauduio,

Last time I have written line of C code (it was C++ actually) was in year 2002, so forking is not as option.

As far as developer goes, not everyone has FreeBSD installed these days. He (she) might not have platform to test on. He seems to be one man band.
 
You have two bad options. One is to run Linux as the author of IceWM wants you to do. The second one is that you fork the fork and fix non portability issues. If the guy who did the original fork was competent and serious about the quality she/he would not make such beginner mistake.
Interestingly enough someone was aware and wanted to fix it with commit 759987, but didn't. glob_pattern_p is still in use.
globit.c makes use of GNUisms (asprintf, glob_pattern_p), make that code conditional and fix unsafe code
The configure script searches for asprintf(3) (a GNUisms that was imported by the BSDs very long ago) and if it's found defines HAVE_ASPRINTF. The code then assumes that you also have glob_pattern_p (bad!).

Askfor I hope the fork in question is the one at https://github.com/bbidulock/icewm. You never said where to find it.

If you apply this patch you should be able to compile IceWM. Use cmake -DENABLE_NLS=NO instead of the configure script. Can't speak for functionality though. It's clear that some kind of completion support gets disabled by not having glob_pattern_p.
Code:
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ffdff19..68a4bcc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -331,6 +331,7 @@ set(icewm_libs ${sm_LIBS} ${nls_LIBS} ${lsd_LDFLAGS} ${pixbuf_LDFLAGS} ${fontcon
 TARGET_LINK_LIBRARIES(icewm${EXEEXT} ${icewm_libs})
 
 ADD_EXECUTABLE(genpref${EXEEXT} genpref.cc)
+SET_TARGET_PROPERTIES(genpref${EXEEXT} PROPERTIES COMPILE_FLAGS "${x11_CFLAGS}")
 TARGET_LINK_LIBRARIES(genpref${EXEEXT} ${EXTRA_LIBS})
 
 IF(CONFIG_FDO_MENUS)
diff --git a/src/globit.cc b/src/globit.cc
index c0164ef..6e26da1 100644
--- a/src/globit.cc
+++ b/src/globit.cc
@@ -1,5 +1,5 @@
 #include "config.h"
-#ifdef HAVE_ASPRINTF
+#if defined(HAVE_ASPRINTF) && !defined(__FreeBSD__)
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
diff --git a/src/yapp.h b/src/yapp.h
index 8d473f8..75c3e10 100644
--- a/src/yapp.h
+++ b/src/yapp.h
@@ -1,6 +1,7 @@
 #ifndef __YAPP_H
 #define __YAPP_H
 
+#define _POSIX_VISIBLE 200112
 #include <signal.h>
 
 #include "ypaths.h"
diff --git a/src/yinput.cc b/src/yinput.cc
index f5f5f2e..bd641eb 100644
--- a/src/yinput.cc
+++ b/src/yinput.cc
@@ -722,7 +722,7 @@ void YInputLine::autoScroll(int delta, const XMotionEvent *motion) {
     beginAutoScroll(delta ? true : false, motion);
 }
 void YInputLine::complete() {
-#ifdef HAVE_ASPRINTF
+#if defined(HAVE_ASPRINTF) && !defined(__FreeBSD__)
     char *res=NULL;
     int  res_count=0;
     cstring t(fText);
I had some iconv related trouble so I had to disable I18N support. That's probably something that the ports system would take care of, if compiled through a port.
 
I stated that the author is Bbidulock at the beginning of the thread. I have some broad idea what iconv does so I figured out it was either NLS or i18n. However, this glibc thing is too much for me. I will apply the patch, but the author comes up with new release every time I check his Github account. New port, new package and new maintainer is needed, but my C skills are too low. As far as I understand there is no maintainer for the old branch either. I might try to alert Bbidulock about this, and offer him to test each new version in FreeBSD, if he is interested.
 
Back
Top