head 1.2; access; symbols; locks; strict; comment @ * @; 1.2 date 2026.06.28.00.51.58; author gdt; state Exp; branches; next 1.1; commitid Xu5otFB9D8606vLG; 1.1 date 2026.06.28.00.44.25; author gdt; state Exp; branches; next ; commitid krbxq7yUzi8U2vLG; desc @@ 1.2 log @x11/xephem: Grab 3 more files of upstream pull request 126 Files outside of the old WRKSRC were not picked up by mkpatches. Restore patch comments lost in BUILD_DIRS pivot. @ text @$NetBSD: patch-GUI_xephem_homeio.c,v 1.1 2026/06/28 00:44:25 gdt Exp $ Move errno.h. \todo File upstream after grasping Use pkgsrc share directory. To be maybe filed upstream after figuring out if there is a bug, but I didn't understand this last time around. --- GUI/xephem/homeio.c.orig 2024-02-13 14:35:36.000000000 +0000 +++ GUI/xephem/homeio.c @@@@ -11,6 +11,9 @@@@ #include #include #include +#if defined(__STDC__) +#include +#endif #include "xephem.h" @@@@ -192,31 +195,11 @@@@ tempfilename (char *buf, char *name, cha char * getShareDir() { - static char *basedir; - - if (!basedir) { - char *th = getenv ("TELHOME"); - if (th) { - basedir = malloc (strlen(th) + 10); - if (basedir) { - (void) sprintf (basedir, "%s/xephem", th); - if (existsh(basedir) < 0) { - (void) sprintf (basedir, "%s/archive", th); - if (existsh(basedir) < 0) { - free (basedir); - basedir = NULL; - } - } - } - } - if (!basedir) { - char *homebase = expand_home (getXRes ("ShareDir", ".")); - basedir = strcpy(malloc(strlen(homebase)+1), homebase); - } - } - - return (basedir); - + /* + * pkgsrc: just use pkgsrc version, for now, because a twisty maze + * of Xt calls wrongly returns "." for no apparent reason + */ + return("@@SHAREDIR@@"); } /* return a string for whatever is in errno right now. @@@@ -227,7 +210,6 @@@@ syserrstr () { #if defined(__STDC__) /* some older gcc don't have strerror */ -#include return (strerror (errno)); #else #if defined(VMS) @ 1.1 log @x11/xephem: Pivot from WRKSRC to BUILD_DIRS WRKSRC implies that the build does not look outside of it, but that's not true. Instead, make WRKSRC top level, and instead invoke make in (singleton) BUILD_DIRS. This is a huge commit textually, but it's just a pivot in how the subdir is used, adding BUILD_DIRS to paths, and renaming all the patches. NFCI; this should produce the same binary. Works on netbsd-10 amd64 in "look at sky view, didn't crash, not blank" testing. @ text @d1 1 a1 1 $NetBSD$ d3 5 @