diff options
author | Azat Bahawi <azat@bahawi.net> | 1970-01-01 03:00:00 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-09-20 11:52:07 +0300 |
commit | 962c35425636e3f942fd8a624369a7c53748f47e (patch) | |
tree | c69e76f6c4cdd7f9f66d02a02ee683fe4d5426e7 /etc/portage/patches |
Diffstat (limited to 'etc/portage/patches')
6 files changed, 2280 insertions, 0 deletions
diff --git a/etc/portage/patches/app-admin/haskell-updater/emerge-no-ask.patch b/etc/portage/patches/app-admin/haskell-updater/emerge-no-ask.patch new file mode 100644 index 0000000..7b74439 --- /dev/null +++ b/etc/portage/patches/app-admin/haskell-updater/emerge-no-ask.patch @@ -0,0 +1,12 @@ +diff --git a/Distribution/Gentoo/PkgManager.hs b/Distribution/Gentoo/PkgManager.hs +index 8e8cf0a..e7a3cef 100644 +--- a/Distribution/Gentoo/PkgManager.hs ++++ b/Distribution/Gentoo/PkgManager.hs +@@ -95,6 +95,7 @@ defaultPMFlags :: PkgManager -> [String] + defaultPMFlags Portage = [ "--oneshot" + , "--keep-going" + , "--complete-graph" ++ , "--ask=n" + ] + defaultPMFlags PkgCore = [ "--deep" + , "--oneshot" diff --git a/etc/portage/patches/media-libs/opencv-4.5.0/ade_tar.patch b/etc/portage/patches/media-libs/opencv-4.5.0/ade_tar.patch new file mode 100644 index 0000000..80886ef --- /dev/null +++ b/etc/portage/patches/media-libs/opencv-4.5.0/ade_tar.patch @@ -0,0 +1,14 @@ +diff --git i/modules/gapi/cmake/DownloadADE.cmake w/modules/gapi/cmake/DownloadADE.cmake +index ee1b645..26d1ce4 100644 +--- i/modules/gapi/cmake/DownloadADE.cmake ++++ w/modules/gapi/cmake/DownloadADE.cmake +@@ -1,7 +1,7 @@ + set(ade_src_dir "${OpenCV_BINARY_DIR}/3rdparty/ade") +-set(ade_filename "v0.1.1f.zip") ++set(ade_filename "v0.1.1f.tar.gz") + set(ade_subdir "ade-0.1.1f") +-set(ade_md5 "b624b995ec9c439cbc2e9e6ee940d3a2") ++set(ade_md5 "07749ec1fb889049bd81518925efd224") + ocv_download(FILENAME ${ade_filename} + HASH ${ade_md5} + URL diff --git a/etc/portage/patches/sys-apps/coreutils-8.32-r1/advcpmv-0.8-8.32.patch b/etc/portage/patches/sys-apps/coreutils-8.32-r1/advcpmv-0.8-8.32.patch new file mode 100644 index 0000000..c4dfc9a --- /dev/null +++ b/etc/portage/patches/sys-apps/coreutils-8.32-r1/advcpmv-0.8-8.32.patch @@ -0,0 +1,648 @@ +diff -aur coreutils-8.32/src/copy.c coreutils-8.32-patched/src/copy.c +--- coreutils-8.32/src/copy.c 2020-01-01 15:13:12.000000000 +0100 ++++ coreutils-8.32-patched/src/copy.c 2020-05-23 13:25:09.286684100 +0200 +@@ -129,6 +129,72 @@ + dev_t dev; + }; + ++struct progress_status { ++ int iCountDown; ++ char ** cProgressField; ++ struct timeval last_time; ++ int last_size, iBarLength; ++ struct stat src_open_sb; ++}; ++ ++/* Begin progress Mod*/ ++static void file_progress_bar ( char * _cDest, int _iBarLength, long _lProgress, long _lTotal ) ++{ ++ double dPercent = (double) _lProgress / (double) _lTotal * 100.f; ++ sprintf( _cDest + ( _iBarLength - 6), "%4.1f", dPercent ); ++ _cDest[_iBarLength - 2] = ' '; ++ ++ int i; ++ for ( i=1; i<=_iBarLength - 9; i++) ++ { ++ if ( dPercent > (double) (i-1) / (_iBarLength - 10) * 100.f ) ++ { ++ _cDest[i] = '='; ++ } ++ else ++ { ++ _cDest[i] = ' '; ++ } ++ } ++ for ( i=1; i<_iBarLength - 9; i++) ++ { ++ if ( ( _cDest[i+1] == ' ' ) && ( _cDest[i] == '=' ) ) ++ _cDest[i] = '>' ; ++ } ++} ++ ++int file_size_format ( char * _cDst, long _lSize, int _iCounter ) ++{ ++ int iCounter = _iCounter; ++ double dSize = ( double ) _lSize; ++ while ( dSize >= 1000. ) ++ { ++ dSize /= 1024.; ++ iCounter++; ++ } ++ ++ /* get unit */ ++ char * sUnit; ++ if ( iCounter == 0 ) ++ sUnit = "B"; ++ else if ( iCounter == 1 ) ++ sUnit = "KiB"; ++ else if ( iCounter == 2 ) ++ sUnit = "MiB"; ++ else if ( iCounter == 3 ) ++ sUnit = "GiB"; ++ else if ( iCounter == 4 ) ++ sUnit = "TiB"; ++ else ++ sUnit = "N/A"; ++ ++ /* write number */ ++ return sprintf ( _cDst, "%5.1f %s", dSize, sUnit ); ++} ++/* END progress mod */ ++ ++ ++ + /* Initial size of the cp.dest_info hash table. */ + #define DEST_INFO_INITIAL_CAPACITY 61 + +@@ -261,7 +327,8 @@ + size_t hole_size, bool punch_holes, + char const *src_name, char const *dst_name, + uintmax_t max_n_read, off_t *total_n_read, +- bool *last_write_made_hole) ++ bool *last_write_made_hole, ++ struct progress_status *s_progress) + { + *last_write_made_hole = false; + *total_n_read = 0; +@@ -270,6 +337,83 @@ + + while (max_n_read) + { ++ ++ if (progress) { ++ /* BEGIN progress mod */ ++ /* update countdown */ ++ s_progress->iCountDown--; ++ char * sProgressBar = s_progress->cProgressField[5]; ++ if ( s_progress->iCountDown < 0 ) ++ s_progress->iCountDown = 100; ++ ++ /* just print one line with the percentage, but not always */ ++ if ( s_progress->iCountDown == 0 ) ++ { ++ /* calculate current speed */ ++ struct timeval cur_time; ++ gettimeofday ( & cur_time, NULL ); ++ int cur_size = g_iTotalWritten + *total_n_read / 1024; ++ int usec_elapsed = cur_time.tv_usec - s_progress->last_time.tv_usec; ++ double sec_elapsed = ( double ) usec_elapsed / 1000000.f; ++ sec_elapsed += ( double ) ( cur_time.tv_sec - s_progress->last_time.tv_sec ); ++ int copy_speed = ( int ) ( ( double ) ( cur_size - s_progress->last_size ) ++ / sec_elapsed ); ++ char s_copy_speed[20]; ++ file_size_format ( s_copy_speed, copy_speed, 1 ); ++ /* update vars */ ++ s_progress->last_time = cur_time; ++ s_progress->last_size = cur_size; ++ ++ /* how many time has passed since the start? */ ++ int isec_elapsed = cur_time.tv_sec - g_oStartTime.tv_sec; ++ int sec_remaining = ( int ) ( ( double ) isec_elapsed / cur_size ++ * g_iTotalSize ) - isec_elapsed; ++ int min_remaining = sec_remaining / 60; ++ sec_remaining -= min_remaining * 60; ++ int hours_remaining = min_remaining / 60; ++ min_remaining -= hours_remaining * 60; ++ /* print out */ ++ sprintf ( s_progress->cProgressField[3], ++ "Copying at %s/s (about %uh %um %us remaining)", s_copy_speed, ++ hours_remaining, min_remaining, sec_remaining ); ++ ++ int fs_len; ++ if ( g_iTotalFiles > 1 ) ++ { ++ /* global progress bar */ ++ file_progress_bar ( s_progress->cProgressField[2], s_progress->iBarLength, ++ g_iTotalWritten + *total_n_read / 1024, g_iTotalSize ); ++ ++ /* print the global status */ ++ fs_len = file_size_format ( s_progress->cProgressField[1] + s_progress->iBarLength - 21, ++ g_iTotalWritten + *total_n_read / 1024, 1 ); ++ s_progress->cProgressField[1][s_progress->iBarLength - 21 + fs_len] = ' '; ++ } ++ ++ /* current progress bar */ ++ file_progress_bar ( sProgressBar, s_progress->iBarLength, *total_n_read, s_progress->src_open_sb.st_size ); ++ ++ /* print the status */ ++ fs_len = file_size_format ( s_progress->cProgressField[4] + s_progress->iBarLength - 21, *total_n_read, 0 ); ++ s_progress->cProgressField[4][s_progress->iBarLength - 21 + fs_len] = ' '; ++ ++ /* print the field */ ++ int it; ++ for ( it = g_iTotalFiles>1 ? 0 : 3; it < 6; it++ ) ++ { ++ printf ( "\033[K%s\n", s_progress->cProgressField[it] ); ++ if ( strlen ( s_progress->cProgressField[it] ) < s_progress->iBarLength ) ++ printf ( "" ); ++ } ++ if ( g_iTotalFiles > 1 ) ++ printf ( "\r\033[6A" ); ++ else ++ printf ( "\r\033[3A" ); ++ fflush ( stdout ); ++ } ++ /* END progress mod */ ++ } ++ + ssize_t n_read = read (src_fd, buf, MIN (max_n_read, buf_size)); + if (n_read < 0) + { +@@ -354,6 +498,14 @@ + certain files in /proc or /sys with linux kernels. */ + } + ++ /* BEGIN progress mod */ ++ if (progress) { ++ /* update total size */ ++ g_iTotalWritten += *total_n_read / 1024; ++ g_iFilesCopied++; ++ } ++ /* END progress mod */ ++ + /* Ensure a trailing hole is created, so that subsequent + calls of sparse_copy() start at the correct offset. */ + if (make_hole && ! create_hole (dest_fd, dst_name, punch_holes, psize)) +@@ -422,7 +574,9 @@ + size_t hole_size, off_t src_total_size, + enum Sparse_type sparse_mode, + char const *src_name, char const *dst_name, +- bool *require_normal_copy) ++ bool *require_normal_copy, ++ int iCountDown, char ** cProgressField, struct timeval last_time, ++ int last_size, int iBarLength, struct stat src_open_sb) + { + struct extent_scan scan; + off_t last_ext_start = 0; +@@ -553,10 +707,16 @@ + last_ext_len = ext_len; + bool read_hole; + ++ struct timeval a; ++ struct stat b; ++ ++ struct progress_status s_progress={iCountDown, cProgressField, last_time, last_size, iBarLength, src_open_sb}; ++ ++ + if ( ! sparse_copy (src_fd, dest_fd, buf, buf_size, + sparse_mode == SPARSE_ALWAYS ? hole_size: 0, + true, src_name, dst_name, ext_len, &n_read, +- &read_hole)) ++ &read_hole,&s_progress)) + goto fail; + + dest_pos = ext_start + n_read; +@@ -1305,6 +1465,70 @@ + buf_alloc = xmalloc (buf_size + buf_alignment); + buf = ptr_align (buf_alloc, buf_alignment); + ++ /* BEGIN progress mod */ ++ /* create a field of 6 lines */ ++ char ** cProgressField = ( char ** ) calloc ( 6, sizeof ( char * ) ); ++ /* get console width */ ++ int iBarLength = 80; ++ struct winsize win; ++ if ( ioctl (STDOUT_FILENO, TIOCGWINSZ, (char *) &win) == 0 && win.ws_col > 0 ) ++ iBarLength = win.ws_col; ++ /* create rows */ ++ int it; ++ for ( it = 0; it < 6; it++ ) ++ { ++ cProgressField[it] = ( char * ) malloc ( iBarLength + 1 ); ++ /* init with spaces */ ++ int j; ++ for ( j = 0; j < iBarLength; j++ ) ++ cProgressField[it][j] = ' '; ++ cProgressField[it][iBarLength] = '\0'; ++ } ++ ++ /* global progress bar? */ ++ if ( g_iTotalFiles > 1 ) ++ { ++ /* init global progress bar */ ++ cProgressField[2][0] = '['; ++ cProgressField[2][iBarLength - 8] = ']'; ++ cProgressField[2][iBarLength - 7] = ' '; ++ cProgressField[2][iBarLength - 1] = '%'; ++ ++ /* total size */ ++ cProgressField[1][iBarLength - 11] = '/'; ++ file_size_format ( cProgressField[1] + iBarLength - 9, g_iTotalSize, 1 ); ++ ++ /* show how many files were written */ ++ int sum_length = sprintf ( cProgressField[1], "%d files copied so far...", g_iFilesCopied ); ++ cProgressField[1][sum_length] = ' '; ++ } ++ ++ /* truncate filename? */ ++ int fn_length; ++ if ( strlen ( src_name ) > iBarLength - 22 ) ++ fn_length = ++ sprintf ( cProgressField[4], "...%s", src_name + ( strlen ( src_name ) - iBarLength + 25 ) ); ++ else ++ fn_length = sprintf ( cProgressField[4], "%s", src_name ); ++ cProgressField[4][fn_length] = ' '; ++ ++ /* filesize */ ++ cProgressField[4][iBarLength - 11] = '/'; ++ file_size_format ( cProgressField[4] + iBarLength - 9, src_open_sb.st_size, 0 ); ++ ++ int iCountDown = 1; ++ char * sProgressBar = cProgressField[5]; ++ sProgressBar[0] = '['; ++ sProgressBar[iBarLength - 8] = ']'; ++ sProgressBar[iBarLength - 7] = ' '; ++ sProgressBar[iBarLength - 1] = '%'; ++ ++ /* this will always save the time in between */ ++ struct timeval last_time; ++ gettimeofday ( & last_time, NULL ); ++ int last_size = g_iTotalWritten; ++ /* END progress mod */ ++ + if (sparse_src) + { + bool normal_copy_required; +@@ -1316,7 +1540,9 @@ + if (extent_copy (source_desc, dest_desc, buf, buf_size, hole_size, + src_open_sb.st_size, + make_holes ? x->sparse_mode : SPARSE_NEVER, +- src_name, dst_name, &normal_copy_required)) ++ src_name, dst_name, &normal_copy_required, ++ iCountDown, cProgressField, last_time, last_size, ++ iBarLength, src_open_sb)) + goto preserve_metadata; + + if (! normal_copy_required) +@@ -1328,11 +1554,12 @@ + + off_t n_read; + bool wrote_hole_at_eof; ++ struct progress_status s_progress = { iCountDown, cProgressField, last_time, last_size, iBarLength, src_open_sb}; + if (! sparse_copy (source_desc, dest_desc, buf, buf_size, + make_holes ? hole_size : 0, + x->sparse_mode == SPARSE_ALWAYS, src_name, dst_name, + UINTMAX_MAX, &n_read, +- &wrote_hole_at_eof)) ++ &wrote_hole_at_eof, &s_progress)) + { + return_val = false; + goto close_src_and_dst_desc; +@@ -1343,6 +1570,14 @@ + return_val = false; + goto close_src_and_dst_desc; + } ++ /* BEGIN progress mod */ ++ if (progress) { ++ int i; ++ for ( i = 0; i < 6; i++ ) ++ free ( cProgressField[i] ); ++ free ( cProgressField ); ++ } ++ /* END progress mod */ + } + + preserve_metadata: +Only in coreutils-8.32-patched/src: copy.c.orig +diff -aur coreutils-8.32/src/copy.h coreutils-8.32-patched/src/copy.h +--- coreutils-8.32/src/copy.h 2020-01-01 15:13:12.000000000 +0100 ++++ coreutils-8.32-patched/src/copy.h 2020-05-23 13:25:09.286684100 +0200 +@@ -234,6 +234,9 @@ + Create destination directories as usual. */ + bool symbolic_link; + ++ /* If true, draw a nice progress bar on screen */ ++ bool progress_bar; ++ + /* If true, do not copy a nondirectory that has an existing destination + with the same or newer modification time. */ + bool update; +@@ -304,4 +307,15 @@ + bool chown_failure_ok (struct cp_options const *) _GL_ATTRIBUTE_PURE; + mode_t cached_umask (void); + ++/* BEGIN OF PROGRESS MOD */ ++int file_size_format ( char * _cDst, long _lSize, int _iCounter ); ++ ++__attribute__((__common__)) long g_iTotalSize; ++__attribute__((__common__)) long g_iTotalWritten; ++__attribute__((__common__)) int g_iFilesCopied; ++__attribute__((__common__)) struct timeval g_oStartTime; ++__attribute__((__common__)) int g_iTotalFiles; ++__attribute__((__common__)) bool progress; ++/* END OF PROGRESS MOD */ ++ + #endif +Only in coreutils-8.32-patched/src: copy.h.orig +diff -aur coreutils-8.32/src/cp.c coreutils-8.32-patched/src/cp.c +--- coreutils-8.32/src/cp.c 2020-01-01 15:13:12.000000000 +0100 ++++ coreutils-8.32-patched/src/cp.c 2020-05-23 13:25:09.286684100 +0200 +@@ -131,6 +131,7 @@ + {"symbolic-link", no_argument, NULL, 's'}, + {"target-directory", required_argument, NULL, 't'}, + {"update", no_argument, NULL, 'u'}, ++ {"progress-bar", no_argument, NULL, 'g'}, + {"verbose", no_argument, NULL, 'v'}, + {GETOPT_SELINUX_CONTEXT_OPTION_DECL}, + {GETOPT_HELP_OPTION_DECL}, +@@ -170,6 +171,7 @@ + -f, --force if an existing destination file cannot be\n\ + opened, remove it and try again (this option\n\ + is ignored when the -n option is also used)\n\ ++ -g, --progress-bar add a progress bar\n\ + -i, --interactive prompt before overwrite (overrides a previous -n\ + \n\ + option)\n\ +@@ -635,6 +637,70 @@ + die (EXIT_FAILURE, 0, _("target %s is not a directory"), + quoteaf (file[n_files - 1])); + } ++ struct timeval start_time; ++ if (progress) { ++ /* BEGIN progress mod */ ++ g_iTotalSize = 0; ++ g_iTotalFiles = 0; ++ g_iFilesCopied = 0; ++ g_iTotalWritten = 0; ++ ++ /* save time */ ++ gettimeofday ( & start_time, NULL ); ++ g_oStartTime = start_time; ++ ++ printf ( "Calculating total size... \r" ); ++ fflush ( stdout ); ++ long iTotalSize = 0; ++ int iFiles = n_files; ++ if ( ! target_directory ) ++ iFiles = n_files - 1; ++ int j; ++ ++ /* how many files are we copying */ ++ char command[1024]; ++ sprintf( command, "find \"%s\" -type f | wc -l", file[0]); ++ FILE *fp ; ++ char output[1024]; ++ fp = popen(command,"r"); ++ if ( fp == NULL || fgets(output, sizeof(output)-1, fp) == NULL) ++ printf("failed to run find.\n"); ++ else ++ g_iTotalFiles = atoi( output ) ; ++ ++ for (j = 0; j < iFiles; j++) ++ { ++ /* call du -s for each file */ ++ /* create command */ ++ char command[1024]; ++ sprintf ( command, "du -s \"%s\"", file[j] ); ++ /* TODO: replace all quote signs in file[i] */ ++ ++ FILE *fp; ++ char output[1024]; ++ ++ /* run command */ ++ fp = popen(command, "r"); ++ if (fp == NULL || fgets(output, sizeof(output)-1, fp) == NULL) { ++ printf("failed to run du.\n" ); ++ } ++ else ++ { ++ /* isolate size */ ++ strchr ( output, '\t' )[0] = '\0'; ++ iTotalSize += atol ( output ); ++ ++ printf ( "Calculating total size... %ld\r", iTotalSize ); ++ fflush ( stdout ); ++ } ++ ++ /* close */ ++ pclose(fp); ++ } ++ g_iTotalSize = iTotalSize; ++ /* END progress mod */ ++ } ++ + + if (target_directory) + { +@@ -777,6 +843,46 @@ + ok = copy (source, new_dest, 0, x, &unused, NULL); + } + ++ if (progress) { ++ /* BEGIN progress mod */ ++ /* remove everything */ ++ int i; ++ if ( g_iTotalFiles > 1 ) ++ { ++ for ( i = 0; i < 6; i++ ) ++ printf ( "\033[K\n" ); ++ printf ( "\r\033[6A" ); ++ } ++ else ++ { ++ for ( i = 0; i < 3; i++ ) ++ printf ( "\033[K\n" ); ++ printf ( "\r\033[3A" ); ++ } ++ ++ /* save time */ ++ struct timeval end_time; ++ gettimeofday ( & end_time, NULL ); ++ int usec_elapsed = end_time.tv_usec - start_time.tv_usec; ++ double sec_elapsed = ( double ) usec_elapsed / 1000000.f; ++ sec_elapsed += ( double ) ( end_time.tv_sec - start_time.tv_sec ); ++ ++ /* get total size */ ++ char sTotalWritten[20]; ++ file_size_format ( sTotalWritten, g_iTotalSize, 1 ); ++ /* TODO: using g_iTotalWritten would be more correct, but is less accurate */ ++ ++ /* calculate speed */ ++ int copy_speed = ( int ) ( ( double ) g_iTotalWritten / sec_elapsed ); ++ char s_copy_speed[20]; ++ file_size_format ( s_copy_speed, copy_speed, 1 ); ++ ++ /* good-bye message */ ++ printf ( "%d files (%s) copied in %.1f seconds (%s/s).\n", g_iFilesCopied, sTotalWritten, ++ sec_elapsed, s_copy_speed ); ++ /* END progress mod */ ++ } ++ + return ok; + } + +@@ -812,6 +918,7 @@ + x->recursive = false; + x->sparse_mode = SPARSE_AUTO; + x->symbolic_link = false; ++ x->progress_bar = false; + x->set_mode = false; + x->mode = 0; + +@@ -950,7 +1057,7 @@ + selinux_enabled = (0 < is_selinux_enabled ()); + cp_option_init (&x); + +- while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:TZ", ++ while ((c = getopt_long (argc, argv, "abdfgHilLnprst:uvxPRS:TZ", + long_opts, NULL)) + != -1) + { +@@ -1007,6 +1114,10 @@ + x.unlink_dest_after_failed_open = true; + break; + ++ case 'g': ++ progress = true; ++ break; ++ + case 'H': + x.dereference = DEREF_COMMAND_LINE_ARGUMENTS; + break; +diff -aur coreutils-8.32/src/mv.c coreutils-8.32-patched/src/mv.c +--- coreutils-8.32/src/mv.c 2020-01-01 15:13:12.000000000 +0100 ++++ coreutils-8.32-patched/src/mv.c 2020-05-23 13:25:09.286684100 +0200 +@@ -66,6 +66,7 @@ + {"target-directory", required_argument, NULL, 't'}, + {"update", no_argument, NULL, 'u'}, + {"verbose", no_argument, NULL, 'v'}, ++ {"progress-ar", no_argument, NULL, 'g'}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, + {NULL, 0, NULL, 0} +@@ -168,10 +169,86 @@ + static bool + do_move (const char *source, const char *dest, const struct cp_options *x) + { ++ struct timeval start_time; ++ + bool copy_into_self; + bool rename_succeeded; ++ if(progress && x->rename_errno != 0) { ++ /* BEGIN progress mod */ ++ g_iTotalSize = 0; ++ g_iFilesCopied = 0; ++ g_iTotalWritten = 0; ++ ++ gettimeofday (& start_time, NULL); ++ g_oStartTime = start_time; ++ ++ printf ("Calculating total size... \r"); ++ fflush (stdout); ++ long iTotalSize = 0; ++ /* call du -s for each file */ ++ /* create command */ ++ char command[1024]; ++ sprintf ( command, "du -s '%s'", source ); ++ /* TODO: replace all quote signs in file[i] */ ++ ++ FILE *fp; ++ char output[1024]; ++ ++ /* run command */ ++ fp = popen(command, "r"); ++ if (fp == NULL || fgets(output, sizeof(output)-1, fp) == NULL) { ++ //printf("failed to run du.\n" ); ++ } ++ else ++ { ++ /* isolate size */ ++ strchr ( output, '\t' )[0] = '\0'; ++ iTotalSize += atol ( output ); ++ printf ( "Calculating total size... %ld\r", iTotalSize ); ++ fflush ( stdout ); ++ } ++ ++ /* close */ ++ pclose(fp); ++ g_iTotalSize = iTotalSize; ++ /* END progress mod */ ++ ++ } ++ + bool ok = copy (source, dest, false, x, ©_into_self, &rename_succeeded); + ++ if (progress && (x->rename_errno != 0 && ok)) { ++ /* BEGIN progress mod */ ++ /* remove everything */ ++ int i; ++ int limit = (g_iTotalFiles > 1 ? 6 : 3); ++ for ( i = 0; i < limit; i++ ) ++ printf ( "\033[K\n" ); ++ printf ( "\r\033[3A" ); ++ ++ /* save time */ ++ struct timeval end_time; ++ gettimeofday ( & end_time, NULL ); ++ int usec_elapsed = end_time.tv_usec - start_time.tv_usec; ++ double sec_elapsed = ( double ) usec_elapsed / 1000000.f; ++ sec_elapsed += ( double ) ( end_time.tv_sec - start_time.tv_sec ); ++ ++ /* get total size */ ++ char sTotalWritten[20]; ++ file_size_format ( sTotalWritten, g_iTotalSize, 1 ); ++ /* TODO: using g_iTotalWritten would be more correct, but is less accurate */ ++ ++ /* calculate speed */ ++ int copy_speed = ( int ) ( ( double ) g_iTotalWritten / sec_elapsed ); ++ char s_copy_speed[20]; ++ file_size_format ( s_copy_speed, copy_speed, 1 ); ++ ++ /* good-bye message */ ++ printf ( "%d files (%s) moved in %.1f seconds (%s/s).\n", g_iFilesCopied, sTotalWritten, ++ sec_elapsed, s_copy_speed ); ++ /* END progress mod */ ++ } ++ + if (ok) + { + char const *dir_to_remove; +@@ -306,6 +383,7 @@ + \n\ + -b like --backup but does not accept an argument\n\ + -f, --force do not prompt before overwriting\n\ ++ -g, --progress-bar add progress-bar\n\ + -i, --interactive prompt before overwrite\n\ + -n, --no-clobber do not overwrite an existing file\n\ + If you specify more than one of -i, -f, -n, only the final one takes effect.\n\ +@@ -361,7 +439,7 @@ + /* Try to disable the ability to unlink a directory. */ + priv_set_remove_linkdir (); + +- while ((c = getopt_long (argc, argv, "bfint:uvS:TZ", long_options, NULL)) ++ while ((c = getopt_long (argc, argv, "bfint:uvgS:TZ", long_options, NULL)) + != -1) + { + switch (c) +@@ -407,6 +485,11 @@ + case 'v': + x.verbose = true; + break; ++ ++ case 'g': ++ progress = true; ++ break; ++ + case 'S': + make_backups = true; + backup_suffix = optarg; diff --git a/etc/portage/patches/sys-apps/pmount/btrfs.patch b/etc/portage/patches/sys-apps/pmount/btrfs.patch new file mode 100644 index 0000000..098e086 --- /dev/null +++ b/etc/portage/patches/sys-apps/pmount/btrfs.patch @@ -0,0 +1,12 @@ +diff --git a/src/fs.c b/src/fs.c +index 65ea0c7..6758d63 100644 +--- a/src/fs.c ++++ b/src/fs.c +@@ -29,6 +29,7 @@ static struct FS supported_fs[] = { + { "ext3", "nodev,noauto,nosuid,user,errors=remount-ro", 0, NULL, 0 }, + { "ext2", "nodev,noauto,nosuid,user,errors=remount-ro", 0, NULL, 0 }, + { "ext4", "nodev,noauto,nosuid,user,errors=remount-ro", 0, NULL, 0 }, ++ { "btrfs", "nodev,noauto,nosuid,user", 0, NULL, 0 }, + { "reiserfs", "nodev,noauto,nosuid,user", 0, NULL, 0 }, + { "reiser4", "nodev,noauto,nosuid,user", 0, NULL, 0 }, + { "xfs", "nodev,noauto,nosuid,user", 0, NULL, 0 }, diff --git a/etc/portage/patches/sys-power/suspend/gcc-10.patch b/etc/portage/patches/sys-power/suspend/gcc-10.patch new file mode 100644 index 0000000..00da540 --- /dev/null +++ b/etc/portage/patches/sys-power/suspend/gcc-10.patch @@ -0,0 +1,93 @@ +diff -Nupr suspend~/s2ram-x86.h suspend/s2ram-x86.h +--- suspend~/s2ram-x86.h 2012-09-15 22:23:44.000000000 +0200 ++++ suspend/s2ram-x86.h 2020-05-14 19:04:21.979507630 +0200 +@@ -18,9 +18,9 @@ + /* Item size */ + #define ITEMSZ 1024 + +-char bios_version[ITEMSZ], sys_vendor[ITEMSZ], sys_product[ITEMSZ], sys_version[ITEMSZ]; ++extern char bios_version[ITEMSZ], sys_vendor[ITEMSZ], sys_product[ITEMSZ], sys_version[ITEMSZ]; + +-int flags, force, fb_nosuspend, no_kms_flag; ++extern int flags, force, fb_nosuspend, no_kms_flag; + + #define HACKS_LONG_OPTS \ + {\ +diff -Nupr suspend~/s2ram-x86.c suspend/s2ram-x86.c +--- suspend~/s2ram-x86.c 2012-09-15 22:23:44.000000000 +0200 ++++ suspend/s2ram-x86.c 2020-05-14 19:33:34.683394349 +0200 +@@ -38,6 +38,10 @@ static int vbe_mode = -1, dmi_scanned; + #define S2RAM_NOFB 126 + #define S2RAM_UNKNOWN 127 + ++/* extern in s2ram-{{arch}}.h */ ++char bios_version[ITEMSZ], sys_vendor[ITEMSZ], sys_product[ITEMSZ], sys_version[ITEMSZ]; ++int flags, force, fb_nosuspend, no_kms_flag; ++ + void identify_machine(void) + { + if (!dmi_scanned) { +diff -Nupr suspend~/load.c suspend/load.c +--- suspend~/load.c 2020-05-14 18:54:12.683547000 +0200 ++++ suspend/load.c 2020-05-14 19:15:39.056797202 +0200 +@@ -549,7 +549,7 @@ static int decrypt_key(struct image_head + memcpy(key, res, KEY_SIZE); + memcpy(ivec, res + KEY_SIZE, CIPHER_BLOCK); + } else { +- fprintf(stderr,"The main key has invalid length %i, need %i\n", s, KEY_SIZE + CIPHER_BLOCK); ++ fprintf(stderr,"The main key has invalid length %zu, need %i\n", s, KEY_SIZE + CIPHER_BLOCK); + ret = -ENODATA; + } + gcry_free(res); +diff -Nupr suspend~/vbetool/vbetool.c suspend/vbetool/vbetool.c +--- suspend~/vbetool/vbetool.c 2012-09-15 22:23:44.000000000 +0200 ++++ suspend/vbetool/vbetool.c 2020-05-14 19:14:21.587468876 +0200 +@@ -320,7 +320,7 @@ char *__save_state(int *psize) + + memset(&r, 0, sizeof(r)); + +- fprintf(stderr, "Allocated buffer at %p (base is 0x%x)\n", buffer, ++ fprintf(stderr, "Allocated buffer at %p (base is 0x%zx)\n", buffer, + LRMI_base_addr()); + + r.eax = 0x4f04; +diff -Nupr suspend~/vbetool/vbetool.c suspend/vbetool/vbetool.c +--- suspend~/vbetool/vbetool.c 2020-05-14 20:16:16.880562075 +0200 ++++ suspend/vbetool/vbetool.c 2020-05-14 20:50:20.563096451 +0200 +@@ -243,9 +243,9 @@ void restore_state_from(char *data) + r.eax = 0x4f04; + r.ecx = 0xf; /* all states */ + r.edx = 2; /* restore state */ +- r.es = (unsigned int) (data - LRMI_base_addr()) >> 4; +- r.ebx = (unsigned int) (data - LRMI_base_addr()) & 0xf; +- r.ds = 0x0040; ++ r.es = (unsigned short) (((data - (char*) LRMI_base_addr()) >> 4) & 0xffff); ++ r.ebx = (unsigned int) ((data - (char*) LRMI_base_addr()) & 0xf); ++ r.ds = 0x0040; + + if (!LRMI_int(0x10, &r)) { + fprintf(stderr, +@@ -327,9 +327,9 @@ char *__save_state(int *psize) + r.ecx = 0xf; /* all states */ + r.edx = 1; /* save state */ + +- r.es = (unsigned int) (buffer - LRMI_base_addr()) >> 4; +- r.ebx = (unsigned int) (buffer - LRMI_base_addr()) & 0xf; +- r.ds = 0x0040; ++ r.es = (unsigned short) (((buffer - (char*) LRMI_base_addr()) >> 4) & 0xffff); ++ r.ebx = (unsigned int) ((buffer - (char*) LRMI_base_addr()) & 0xf); ++ r.ds = 0x0040; + + fprintf(stderr, "ES: 0x%04X EBX: 0x%04X\n", r.es, r.ebx); + +@@ -525,8 +525,8 @@ int do_get_panel_id(int just_dimensions) + .ebx = 0x0001 + }; + struct panel_id *id = LRMI_alloc_real(sizeof(struct panel_id)); +- r.es = (unsigned short)(((int)(id-LRMI_base_addr()) >> 4) & 0xffff); +- r.edi = (unsigned long)(id-LRMI_base_addr()) & 0xf; ++ r.es = (unsigned short) (((id - LRMI_base_addr()) >> 4) & 0xffff); ++ r.edi = (unsigned long) ((id - LRMI_base_addr()) & 0xf); + + if(sizeof(struct panel_id) != 32) + return fprintf(stderr, "oops: panel_id, sizeof struct panel_id != 32, it's %ld...\n", sizeof(struct panel_id)), 7; diff --git a/etc/portage/patches/x11-misc/xsnow/compositor.patch b/etc/portage/patches/x11-misc/xsnow/compositor.patch new file mode 100644 index 0000000..7ecedf0 --- /dev/null +++ b/etc/portage/patches/x11-misc/xsnow/compositor.patch @@ -0,0 +1,1501 @@ +diff -rupN ./xsnow-1.42/make2.com xsnow-comp-tmp/make2.com +--- ./xsnow-1.42/make2.com 1995-11-19 06:53:27.000000000 -0500 ++++ xsnow-comp-tmp/make2.com 1969-12-31 19:00:00.000000000 -0500 +@@ -1,51 +0,0 @@ +-$! Compile and link Xsnow under VMS +-$! +-$! Get compiler info +-$! +-$ CFLAGS = "/optimize" +-$ decc = f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "" - +- .and. CFLAGS - "/VAXC" .eqs. CFLAGS +-$ all_cflags = CFLAGS +-$ if decc then all_cflags = "/DECC/PREFIX=ALL " + all_cflags +-$! +-$! Build the option-file +-$! +-$ open/write optf xsnow.opt +-$ write optf "xsnow" +-$ if .not.decc then write optf "SYS$SHARE:ucx$ipc/lib" +-$ write optf "Identification=""Xsnow 1.39"" +-$! +-$! +-$! Find out which X-Version we're running. This will fail for older +-$! VMS versions (i.e., v5.5-1). Therefore, choose DECWindows XUI for +-$! default. +-$! +-$ On Error Then GoTo XUI +-$ @sys$update:decw$get_image_version sys$share:decw$xlibshr.exe decw$version +-$ if f$extract(4,3,decw$version).eqs."1.0" +-$ then +-$ write optf "Sys$share:DECW$DWTLIBSHR.EXE/Share" +-$ endif +-$ if f$extract(4,3,decw$version).eqs."1.1" +-$ then +-$ write optf "sys$share:decw$xmulibshr.exe/share" +-$ write optf "sys$share:decw$xtshr.exe/share" +-$ endif +-$ if f$extract(4,3,decw$version).eqs."1.2" +-$ then +-$ write optf "sys$share:decw$xmulibshrr5.exe/share" +-$ write optf "sys$share:decw$xtlibshrr5.exe/share" +-$ endif +-$ GoTo MAIN +-$! +-$XUI: +-$! +-$ write optf "Sys$share:DECW$DWTLIBSHR.EXE/Share" +-$MAIN: +-$! +-$ write optf "sys$share:decw$xlibshr.exe/share" +-$ if .not.decc then write optf "SYS$SHARE:VAXCRTL/SHARE" +-$ close optf +-$ cc'all_cflags' xsnow.c +-$ link xsnow.opt/opt +-$ exit +diff -rupN ./xsnow-1.42/make.com xsnow-comp-tmp/make.com +--- ./xsnow-1.42/make.com 1995-11-19 06:53:27.000000000 -0500 ++++ xsnow-comp-tmp/make.com 1969-12-31 19:00:00.000000000 -0500 +@@ -1,85 +0,0 @@ +-$! Compile and link Xsnow under VMS +-$! +-$! Get compiler info +-$! +-$ XSNOW_VERSION = "Xsnow 1.37" +-$ +-$ echo := write sys$output +-$ echo " --- This is a command procedure to build ''XSNOW_VERSION' ---" +-$ +-$ CFLAGS = "/OPTIMIZE" +-$ decc = f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "" - +- .and. CFLAGS - "/VAXC" .eqs. CFLAGS +-$ all_cflags = CFLAGS +-$ if decc then all_cflags = "/DECC/PREFIX=ALL " + all_cflags +-$! +-$! Build the option-file +-$! +-$ open/write optf xsnow.opt +-$ write optf "xsnow" +-$ if .not.decc +-$ then +-$ if f$trnlmn("MULTINET").nes."" +-$ then +-$ ! Try first the SHARE in MULTINET: +-$ write optf "MULTINET:UCX$IPC_SHR/SHARE" +-$ else +-$ ! Well, try the OLB then ... +-$ if f$search("SYS$SHARE:UCX$IPC.OLB").nes."" +-$ then write optf "SYS$SHARE:ucx$ipc/lib" +-$ endif +-$ endif +-$ endif +-$ write optf "Identification=""''XSNOW_VERSION'"" +-$! +-$! +-$! Find out which X-Version we're running. This will fail for older +-$! VMS versions (i.e., v5.5-1). Therefore, choose DECWindows XUI for +-$! default. +-$! +-$ On Error Then GoTo XUI +-$ IF F$SEARCH("SYS$UPDATE:DECW$GET_IMAGE_VERSION.COM").NES."" +-$ THEN +-$ @sys$update:decw$get_image_version sys$share:decw$xlibshr.exe decw$version +-$ if f$extract(4,3,decw$version).eqs."1.0" +-$ then +-$ write optf "Sys$share:DECW$DWTLIBSHR.EXE/Share" +-$ endif +-$ if f$extract(4,3,decw$version).eqs."1.1" +-$ then +-$ write optf "sys$share:decw$xmulibshr.exe/share" +-$ write optf "sys$share:decw$xtshr.exe/share" +-$ endif +-$ if f$extract(4,3,decw$version).eqs."1.2" +-$ then +-$ write optf "sys$share:decw$xmulibshrr5.exe/share" +-$ write optf "sys$share:decw$xtlibshrr5.exe/share" +-$ endif +-$ GoTo MAIN +-$ ENDIF +-$! +-$XUI: +-$! +-$ write optf "Sys$share:DECW$DWTLIBSHR.EXE/Share" +-$MAIN: +-$! +-$ set noon +-$ write optf "sys$share:decw$xlibshr.exe/share" +-$ if .not.decc then write optf "SYS$SHARE:VAXCRTL/SHARE" +-$ close optf +-$ echo " . Compiling Xsnow " +-$ cc'all_cflags' xsnow.c +-$ echo " . Linking Xsnow" +-$ on error then goto ERR +-$ link xsnow.opt/opt +-$ echo "" +-$ echo "Xsnow is ready." +-$ echo " XSNOW :== $''f$env("DEFAULT")'XSNOW" +-$ echo "" +-$ XSNOW :== $'f$env("DEFAULT")'XSNOW +-$ exit +-$ +-$ ERR: +-$ echo "" +-$ echo "An error occur while linking Xsnow - Sorry" +-$ EXIT +diff -rupN ./xsnow-1.42/Makefile xsnow-comp-tmp/Makefile +--- ./xsnow-1.42/Makefile 2001-12-15 18:43:31.000000000 -0500 ++++ xsnow-comp-tmp/Makefile 1969-12-31 19:00:00.000000000 -0500 +@@ -1,957 +0,0 @@ +-# Makefile generated by imake - do not edit! +-# $TOG: imake.c /main/104 1998/03/24 12:45:15 kaleb $ +- +-# ---------------------------------------------------------------------- +-# Makefile generated from "Imake.tmpl" and <Imakefile> +-# $TOG: Imake.tmpl /main/249 1997/10/13 15:28:56 kaleb $ +-# +-# +-# +-# +-# $XFree86: xc/config/cf/Imake.tmpl,v 3.87 2000/12/02 19:06:57 herrb Exp $ +-# ---------------------------------------------------------------------- +- +-all:: +- +-.SUFFIXES: .i +- +-# $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $ +- +-# $XFree86: xc/config/cf/Imake.cf,v 3.63 2000/11/06 19:24:00 dawes Exp $ +- +-# Keep cpp from replacing path elements containing 1/i586/i686 +- +-# for compatibility with 3.3.x +- +-# ----------------------------------------------------------------------- +-# site-specific configuration parameters that need to come before +-# the platform-specific parameters - edit site.def to change +- +-# site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ +- +-# site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ +- +-# $XFree86: xc/config/cf/xf86site.def,v 3.170 2000/12/14 16:38:45 dawes Exp $ +- +-# ---------------------------------------------------------------------- +-# platform-specific configuration parameters - edit linux.cf to change +- +-# platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess +- +-# platform: $XFree86: xc/config/cf/linux.cf,v 3.157 2000/12/14 17:00:46 dawes Exp $ +- +-# operating system: SuSE Linux [ELF] (2.4.0) +-# libc: (6.2.0) +-# binutils: (30) +- +-# $TOG: lnxLib.rules /main/14 1998/03/16 11:15:30 mgreess $ +-# $XFree86: xc/config/cf/lnxLib.rules,v 3.38 2000/06/15 20:49:56 dawes Exp $ +- +-# $XFree86: xc/config/cf/xfree86.cf,v 3.338 2000/12/14 16:59:06 dawes Exp $ +- +-# $TOG: xfree86.cf /main/38 1997/10/22 13:01:59 kaleb $ +- +-AFB_DEFS = -DUSE_AFB +- +-DRIVERSDKDIR = $(USRLIBDIR)/Server +-DRIVERSDKMODULEDIR = $(USRLIBDIR)/Server/modules +-DRIVERSDKINCLUDEDIR = $(USRLIBDIR)/Server/include +- +- XF86SRC = $(SERVERSRC)/hw/xfree86 +- XF86COMSRC = $(XF86SRC)/common +- XF86PARSERSRC = $(XF86SRC)/parser +- XF86OSSRC = $(XF86SRC)/os-support +- XF86DRIVERSRC = $(XF86SRC)/drivers +- DRIVERSRC = $(XF86DRIVERSRC) +- +- XFREE86DOCDIR = $(DOCDIR) +- XFREE86PSDOCDIR = $(DOCPSDIR) +- XFREE86HTMLDOCDIR = $(DOCHTMLDIR) +-XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese +- +-# $XConsortium: xf86.rules /main/9 1996/10/31 14:54:26 kaleb $ +-# $XFree86: xc/config/cf/xf86.rules,v 3.32 2000/10/30 23:02:06 tsi Exp $ +- +-# ---------------------------------------------------------------------- +-# site-specific configuration parameters that go after +-# the platform-specific parameters - edit site.def to change +- +-# site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ +- +-# site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ +- +-# --------------------------------------------------------------------- +-# Imake rules for building libraries, programs, scripts, and data files +-# rules: $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $ +-# +-# +-# +-# +-# rules: $XFree86: xc/config/cf/Imake.rules,v 3.86 2000/12/12 17:05:30 dawes Exp $ +- +- _NULLCMD_ = @ echo -n +- +-GLIDE2INCDIR = /usr/include/glide +- +-GLIDE3INCDIR = /usr/include/glide3 +- +-GLIDE3LIBNAME = glide3 +- +-TKLIBNAME = +- +-TKLIBDIR = +- +-TCLLIBNAME = +- +-TCLIBDIR = +- +- PATHSEP = / +- SHELL = /bin/sh -e +- +- TOP = . +- CURRENT_DIR = . +- +- IMAKE = imake +- DEPEND = gccmakedep +- MKDIRHIER = mkdir -p +- REVPATH = revpath +- EXPORTLISTGEN = +- RMAN = rman +- RMANOPTIONS = -f HTML +- CONFIGSRC = $(TOP)/config +- IMAKESRC = $(CONFIGSRC)/imake +- DEPENDSRC = $(CONFIGSRC)/util +- +- INCROOT = /usr/X11R6/include +- USRLIBDIR = /usr/X11R6/lib +- VARDIR = /var +- VARLIBDIR = $(VARDIR)/lib +- SYSTEMUSRLIBDIR = /usr/lib +- SYSTEMUSRINCDIR = /usr/include +- SHLIBDIR = /usr/X11R6/lib +- LINTLIBDIR = $(USRLIBDIR)/lint +- MANPATH = /usr/X11R6/man +- MANSOURCEPATH = $(MANPATH)/man +- MANDIR = $(MANSOURCEPATH)1 +- LIBMANDIR = $(MANSOURCEPATH)3 +- FILEMANDIR = $(MANSOURCEPATH)5 +- MISCMANDIR = $(MANSOURCEPATH)$(MISCMANSUFFIX) +- DRIVERMANDIR = $(MANSOURCEPATH)$(DRIVERMANSUFFIX) +- LOGDIRECTORY = $(VARDIR)/log +- +- VARRUNDIR = $(VARDIR)/run +- +- VARDBDIR = /var/lib +- +- AR = ar clq +- BOOTSTRAPCFLAGS = +- CC = gcc +- AS = as +- +-.SUFFIXES: .cc +- +- CXX = c++ +- CXXFILT = c++filt +- CXXLIB = +- CXXDEBUGFLAGS = -O2 +-CXXDEPENDINCLUDES = +- CXXEXTRA_DEFINES = +-CXXEXTRA_INCLUDES = +- CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE $(CXXPROJECT_DEFINES) +- CXXOPTIONS = +- CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) +- CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES) +- CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) +- +- COMPRESS = compress +- GZIPCMD = gzip +- CPP = /lib/cpp $(STD_CPP_DEFINES) +- RAWCPP = /lib/cpp -undef $(STD_CPP_OPTIONS) +- PREPROCESSCMD = gcc -E $(STD_CPP_DEFINES) +- INSTALL = install +- INSTALLFLAGS = -c +- LD = ld +- LEX = flex -l +- M4 = m4 +- M4FLAGS = +- LEXLIB = -lfl +- YACC = bison -y +- CCYACC = bison -y +- LINT = lint +- LINTLIBFLAG = -C +- LINTOPTS = -axz +- LN = ln -s +- MAKE = make +- MV = mv -f +- CP = cp +- +- RANLIB = ranlib +- RANLIBINSTFLAGS = +- +- RM = rm -f +- PERL = perl +- PERLOPTS = +- MANSUFFIX = 1x +- LIBMANSUFFIX = 3x +- FILEMANSUFFIX = 5x +- MISCMANSUFFIX = 7 +- DRIVERMANSUFFIX = 4 +- MANDEFS = -D__filemansuffix__=$(FILEMANSUFFIX) -D__miscmansuffix__=$(MISCMANSUFFIX) -D__drivermansuffix__=$(DRIVERMANSUFFIX) -D__projectroot__=$(PROJECTROOT) +- +- TROFF = groff -Tps +- NROFF = nroff +- MSMACROS = -ms +- MANMACROS = -man +- TBL = tbl +- EQN = eqn +- NEQN = neqn +- COL = col +- COLFLAGS = -b +- MODCC = gcc +- MODCPP = /lib/cpp +- MODCFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREAD_CFLAGS) $(ALLDEFINES) +- MODAS = as +- MODASFLAGS = +- MODLD = ld +- MODLDFLAGS = +-MODLDCOMBINEFLAGS = -r +- MODAR = ar clq +- MODRANLIB = +- +- STD_INCLUDES = +- STD_CPP_OPTIONS = -traditional +- STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE $(PROJECT_DEFINES) +- STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE $(PROJECT_DEFINES) +- EXTRA_LOAD_FLAGS = +- EXTRA_LDOPTIONS = +- EXTRA_LIBRARIES = +- TAGS = ctags +- +- PARALLELMFLAGS = +- +- SHAREDCODEDEF = +- SHLIBDEF = +- +- SHLIBLDFLAGS = -shared +- +- PICFLAGS = -fPIC +- +- CXXPICFLAGS = -fPIC +- +- PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO +- +- INSTPGMFLAGS = +- +- INSTBINFLAGS = -m 0755 +- INSTUIDFLAGS = -m 4711 +- INSTLIBFLAGS = -m 0644 +- INSTINCFLAGS = -m 0444 +- INSTMANFLAGS = -m 0444 +- INSTDATFLAGS = -m 0444 +- INSTKMEMFLAGS = -m 4711 +- +- PROJECTROOT = /usr/X11R6 +- +- CDEBUGFLAGS = -O2 +- CCOPTIONS = +- +- ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) +- ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) +- CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES) +- LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) +- LDPRELIB = -L$(USRLIBDIR) +- LDPOSTLIB = +- LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) +- CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) +- +- LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) +- +- CCLINK = $(CC) +- +- CXXLINK = $(CXX) +- +- LDSTRIPFLAGS = -x +- LDCOMBINEFLAGS = -r +- DEPENDFLAGS = +- +-# Not sure this belongs here +- TKLIBDIR = +- TKINCDIR = +- TKLIBNAME = +- TKLIBRARY = -L$(TKLIBDIR) -l$(TKLIBNAME) +- TCLLIBDIR = +- TCLINCDIR = +- TCLLIBNAME = +- TCLLIBRARY = -L$(TCLLIBDIR) -l$(TCLLIBNAME) +- +- MACROFILE = linux.cf +- RM_CMD = $(RM) +- +- IMAKE_DEFINES = +- +- IRULESRC = $(CONFIGDIR) +- IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) +- +- ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xf86site.def $(IRULESRC)/host.def $(EXTRA_ICONFIGFILES) +- +-# $TOG: X11.rules /main/4 1997/04/30 15:23:24 kaleb $ +- +-# $XFree86: xc/config/cf/X11.rules,v 1.5 2000/11/06 19:24:00 dawes Exp $ +- +-# ---------------------------------------------------------------------- +-# X Window System Build Parameters and Rules +-# $TOG: X11.tmpl /main/308 1998/06/16 15:14:24 msr $ +-# +-# +-# +-# +-# $XFree86: xc/config/cf/X11.tmpl,v 1.93 2000/12/15 18:18:04 keithp Exp $ +- +-STICKY_DEFINES = -DHAS_STICKY_DIR_BIT +- +-FCHOWN_DEFINES = -DHAS_FCHOWN +- +-# ----------------------------------------------------------------------- +-# X Window System make variables; these need to be coordinated with rules +- +- XTOP = $(TOP) +- BINDIR = /usr/X11R6/bin +- BUILDINCROOT = $(TOP)/exports +- BUILDINCDIR = $(BUILDINCROOT)/include +- BUILDINCTOP = ../.. +- BUILDLIBDIR = $(TOP)/exports/lib +- BUILDLIBTOP = ../.. +- BUILDBINDIR = $(TOP)/exports/bin +- BUILDBINTOP = ../.. +- BUILDMODULEDIR = $(BUILDLIBDIR)/modules +- BUILDMODULETOP = $(BUILDLIBTOP)/.. +- XBUILDINCROOT = $(XTOP)/exports +- XBUILDINCDIR = $(XBUILDINCROOT)/include/X11 +- XBUILDINCTOP = ../../.. +- XBUILDBINDIR = $(XBUILDINCROOT)/bin +- INCDIR = $(INCROOT) +- ADMDIR = /usr/adm +- LIBDIR = $(USRLIBDIR)/X11 +- LIBEXECDIR = /usr/X11R6/libexec +- MODULEDIR = $(USRLIBDIR)/modules +- TOP_X_INCLUDES = +- +- ETCX11DIR = /etc/X11 +- +- CONFDIR = $(ETCX11DIR) +- +- DOCDIR = $(LIBDIR)/doc +- DOCHTMLDIR = $(DOCDIR)/html +- DOCPSDIR = $(DOCDIR)/PostScript +- FONTDIR = $(LIBDIR)/fonts +- ENCODINGSDIR = $(FONTDIR)/encodings +- XINITDIR = $(LIBDIR)/xinit +- XDMDIR = /etc/X11/xdm +- XDMVARDIR = $(VARLIBDIR)/xdm +- TWMDIR = $(LIBDIR)/twm +- XSMDIR = $(LIBDIR)/xsm +- NLSDIR = $(LIBDIR)/nls +- XLOCALEDIR = $(LIBDIR)/locale +- PEXAPIDIR = $(LIBDIR)/PEX +- LBXPROXYDIR = $(LIBDIR)/lbxproxy +- PROXYMANAGERDIR = $(LIBDIR)/proxymngr +- XPRINTDIR = $(LIBDIR)/xserver +- XAPPLOADDIR = $(LIBDIR)/app-defaults +- FONTCFLAGS = -t +- +- INSTAPPFLAGS = $(INSTDATFLAGS) +- +- RGB = $(BINDIR)/rgb +- FONTC = $(BINDIR)/bdftopcf +- MKFONTDIR = $(BINDIR)/mkfontdir +- MKHTMLINDEX = $(BINDIR)/mkhtmlindex +- UCS2ANY = $(BINDIR)/ucs2any.pl +- BDFTRUNCATE = $(BINDIR)/bdftruncate.pl +- UCSMAPPREFIX = $(FONTDIR)/util/map- +- +- HTMLINDEXCMD = HtmlIndexCmd +- +- DOCUTILSRC = $(XTOP)/doc/util +- CLIENTSRC = $(TOP)/clients +- DEMOSRC = $(TOP)/demos +- XDOCMACROS = $(DOCUTILSRC)/macros.t +- XIDXMACROS = $(DOCUTILSRC)/indexmacros.t +- PROGRAMSRC = $(TOP)/programs +- LIBSRC = $(XTOP)/lib +- FONTSRC = $(XTOP)/fonts +- ENCODINGSSRC = $(FONTSRC)/encodings +- INCLUDESRC = $(BUILDINCROOT)/include +- XINCLUDESRC = $(INCLUDESRC)/X11 +- SERVERSRC = $(XTOP)/programs/Xserver +- CONTRIBSRC = $(XTOP)/../contrib +- UNSUPPORTEDSRC = $(XTOP)/unsupported +- DOCSRC = $(XTOP)/doc +- RGBSRC = $(XTOP)/programs/rgb +- BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf +- MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir +- FONTSERVERSRC = $(PROGRAMSRC)/xfs +- FONTINCSRC = $(XTOP)/include/fonts +- EXTINCSRC = $(XTOP)/include/extensions +- FTSOURCEDIR = $(TOP)/extras/FreeType +- XTTSOURCEDIR = $(TOP)/extras/X-TrueType +- MESASRCDIR = $(TOP)/extras/Mesa +- OGLSAMPLESRCDIR = $(TOP)/extras/ogl-sample +- PSWRAPSRC = $(XTOP)/config/pswrap +- TRANSCOMMSRC = $(LIBSRC)/xtrans +- TRANS_INCLUDES = -I$(TRANSCOMMSRC) +- CONNECTION_FLAGS = -DUNIXCONN -DTCPCONN $(STICKY_DEFINES) $(FCHOWN_DEFINES) +- +- XENVLIBDIR = $(USRLIBDIR) +- CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR) +- +-# $TOG: lnxLib.tmpl /main/7 1998/03/20 14:26:41 mgreess $ +-# $XFree86: xc/config/cf/lnxLib.tmpl,v 3.12 1999/06/27 14:07:17 dawes Exp $ +- +- XLIBSRC = $(LIBSRC)/X11 +- +-SOXLIBREV = 6.2 +-DEPXONLYLIB = +-XONLYLIB = -lX11 +- +-LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln +- +- XLIBONLY = $(XONLYLIB) +- +- XEXTLIBSRC = $(LIBSRC)/Xext +- +-SOXEXTREV = 6.4 +-DEPEXTENSIONLIB = +-EXTENSIONLIB = -lXext +- +-LINTEXTENSION = $(LINTLIBDIR)/llib-lXext.ln +- +-LINTEXTENSIONLIB = $(LINTEXTENSION) +- DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) +- XLIB = $(EXTENSIONLIB) $(XONLYLIB) +- LINTXLIB = $(LINTXONLYLIB) +- +- XSSLIBSRC = $(LIBSRC)/Xss +- +-DEPXSSLIB = $(USRLIBDIR)/libXss.a +-XSSLIB = -lXss +- +-LINTXSS = $(LINTLIBDIR)/llib-lXss.ln +- +- XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc +- +-SOXXF86MISCREV = 1.0 +-DEPXXF86MISCLIB = +-XXF86MISCLIB = -lXxf86misc +- +-LINTXXF86MISC = $(LINTLIBDIR)/llib-lXxf86misc.ln +- +- XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm +- +-SOXXF86VMREV = 1.0 +-DEPXXF86VMLIB = +-XXF86VMLIB = -lXxf86vm +- +-LINTXXF86VM = $(LINTLIBDIR)/llib-lXxf86vm.ln +- +- XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga +- +-SOXXF86DGAREV = 1.0 +-DEPXXF86DGALIB = +-XXF86DGALIB = -lXxf86dga +- +-LINTXXF86DGA = $(LINTLIBDIR)/llib-lXxf86dga.ln +- +- XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush +- +-DEPXXF86RUSHLIB = $(USRLIBDIR)/libXxf86rush.a +-XXF86RUSHLIB = -lXxf86rush +- +-LINTXXF86RUSH = $(LINTLIBDIR)/llib-lXxf86rush.ln +- +- XVLIBSRC = $(LIBSRC)/Xv +- +-SOXVREV = 1.0 +-DEPXVLIB = +-XVLIB = -lXv +- +-LINTXV = $(LINTLIBDIR)/llib-lXv.ln +- +- XINERAMALIBSRC = $(LIBSRC)/Xinerama +- +-DEPXINERAMALIB = $(USRLIBDIR)/libXinerama.a +-XINERAMALIB = -lXinerama +- +-LINTXINERAMA = $(LINTLIBDIR)/llib-lXinerama.ln +- +- XINERAMALIBSRC = $(LIBSRC)/Xinerama +- +-DEPXINERAMALIB = $(USRLIBDIR)/libXinerama.a +-XINERAMALIB = -lXinerama +- +-LINTXINERAMA = $(LINTLIBDIR)/llib-lXinerama.ln +- +- DPSLIBSRC = $(LIBSRC)/dps +- +-SODPSREV = 1.0 +-DEPDPSLIB = +-DPSLIB = -ldps +- +-LINTDPS = $(LINTLIBDIR)/llib-ldps.ln +- +- DPSTKLIBSRC = $(LIBSRC)/dpstk +- +-SODPSTKREV = 1.0 +-DEPDPSTKLIB = +-DPSTKLIB = -ldpstk +- +-LINTDPSTK = $(LINTLIBDIR)/llib-ldpstk.ln +- +- PSRESLIBSRC = $(LIBSRC)/psres +- +-SOPSRESREV = 1.0 +-DEPPSRESLIB = +-PSRESLIB = -lpsres +- +-LINTPSRES = $(LINTLIBDIR)/llib-lpsres.ln +- +- GLXLIBSRC = $(LIBSRC)/GL +- +-SOGLREV = 1.2 +-DEPGLXLIB = +-GLXLIB = -lGL +- +-LINTGLX = $(LINTLIBDIR)/llib-lGL.ln +- +- GLWIDGETSRC = $(LIBSRC)/GLw +- +-DEPGLWLIB = $(USRLIBDIR)/libGLw.a +-GLWLIB = -lGLw +- +-LINTGLW = $(LINTLIBDIR)/llib-lGLw.ln +- +- XRENDERLIBSRC = $(LIBSRC)/Xrender +- +-SOXRENDERREV = 1.0 +-DEPXRENDERLIB = +-XRENDERLIB = -lXrender +- +-LINTXRENDER = $(LINTLIBDIR)/llib-lXrender.ln +- +- XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache +- +-DEPXFONTCACHELIB = $(USRLIBDIR)/libXfontcache.a +-XFONTCACHELIB = -lXfontcache +- +-LINTXFONTCACHE = $(LINTLIBDIR)/llib-lXfontcache.ln +- +- XAUTHSRC = $(LIBSRC)/Xau +- +-DEPXAUTHLIB = $(USRLIBDIR)/libXau.a +-XAUTHLIB = -lXau +- +-LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln +- +- XDMCPLIBSRC = $(LIBSRC)/Xdmcp +- +-DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a +-XDMCPLIB = -lXdmcp +- +-LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln +- +- XMUSRC = $(LIBSRC)/Xmu +- +-SOXMUREV = 6.2 +-DEPXMULIB = +-XMULIB = -lXmu +- +-LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln +- +- OLDXLIBSRC = $(LIBSRC)/oldX +- +-DEPOLDXLIB = $(USRLIBDIR)/liboldX.a +-OLDXLIB = -loldX +- +-LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln +- +- XPLIBSRC = $(LIBSRC)/Xp +- +-SOXPREV = 6.2 +-DEPXPLIB = +-XPLIB = -lXp +- +-LINTXP = $(LINTLIBDIR)/llib-lXp.ln +- +- TOOLKITSRC = $(LIBSRC)/Xt +- +-SOXTREV = 6.0 +-DEPXTOOLONLYLIB = +-XTOOLONLYLIB = -lXt +- +-LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln +- +- DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) +- XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) +- LINTXTOOLLIB = $(LINTXTOOLONLYLIB) +- +- XALIBSRC = $(LIBSRC)/Xa +- +-SOXAREV = 1.0 +-DEPXALIB = +-XALIB = -lXa +- +-LINTXA = $(LINTLIBDIR)/llib-lXa.ln +- +- AWIDGETSRC = $(LIBSRC)/Xaw +- +-SOXAWREV = 7.0 +-DEPXAWLIB = +-XAWLIB = -lXaw +- +-LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln +- +- AWIDGET6SRC = $(LIBSRC)/Xaw6 +- +-SOXAW6REV = 6.1 +-DEPXAW6LIB = +-XAW6LIB = -lXaw +- +-LINTXAW6 = $(LINTLIBDIR)/llib-lXaw.ln +- +- XILIBSRC = $(LIBSRC)/Xi +- +-SOXINPUTREV = 6.0 +-DEPXILIB = +-XILIB = -lXi +- +-LINTXI = $(LINTLIBDIR)/llib-lXi.ln +- +- XTESTLIBSRC = $(LIBSRC)/Xtst +- +-SOXTESTREV = 6.1 +-DEPXTESTLIB = +-XTESTLIB = -lXtst +- +-LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln +- +- PEXLIBSRC = $(LIBSRC)/PEX5 +- +-SOPEXREV = 6.0 +-DEPPEXLIB = +-PEXLIB = -lPEX5 +- +-LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln +- +- XIELIBSRC = $(LIBSRC)/XIE +- +-SOXIEREV = 6.0 +-DEPXIELIB = +-XIELIB = -lXIE +- +-LINTXIE = $(LINTLIBDIR)/llib-lXIE.ln +- +- PHIGSLIBSRC = $(LIBSRC)/PHIGS +- +-DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a +-PHIGSLIB = -lphigs +- +-LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln +- +-DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a +-XBSDLIB = -lXbsd +- +-LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln +- +- ICESRC = $(LIBSRC)/ICE +- +-SOICEREV = 6.3 +-DEPICELIB = +-ICELIB = -lICE +- +-LINTICE = $(LINTLIBDIR)/llib-lICE.ln +- +- SMSRC = $(LIBSRC)/SM +- +-SOSMREV = 6.0 +-DEPSMLIB = +-SMLIB = -lSM +- +-LINTSM = $(LINTLIBDIR)/llib-lSM.ln +- +- XKEYSRC = $(LIBSRC)/Xkey +- +-SOXKEYREV = 6.0 +-DEPXKEYLIB = +-XKEYLIB = -lXkey +- +-LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln +- +- FSLIBSRC = $(LIBSRC)/FS +- +-DEPFSLIB = $(USRLIBDIR)/libFS.a +-FSLIB = -lFS +- +-LINTFS = $(LINTLIBDIR)/llib-lFS.ln +- +- FONTLIBSRC = $(LIBSRC)/font +- +-SOFONTREV = 1.3 +-DEPFONTLIB = +-FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) -lXfont +- +-LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln +-# +-SOFONTREV = 1.3 +-DEPXFONTLIB = +-XFONTLIB = -lXfont +- +-LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln +- +- FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs +- +-DEPFONTSTUBLIB = $(USRLIBDIR)/libfntstubs.a +-FONTSTUBLIB = -lfntstubs +- +-LINTFONTSTUB = $(LINTLIBDIR)/llib-lfntstubs.ln +- DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB) +- FONTLIB = $(XFONTLIB) $(FONTSTUBLIB) +- +- XPMLIBSRC = $(LIBSRC)/Xpm +- +-SOXPMREV = 4.11 +-DEPXPMLIB = +-XPMLIB = -lXpm +- +-LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln +- +- XFTLIBSRC = $(LIBSRC)/Xft +- +-SOXFTREV = 1.0 +-DEPXFTLIB = +-XFTLIB = -lXft +- +-LINTXFT = $(LINTLIBDIR)/llib-lXft.ln +- +-FREETYPE2DIR = freetype-2.0.1 +-FREETYPE2LIBDIR = freetype-2.0.1/lib +-FREETYPE2INCDIR = freetype-2.0.1/include/freetype2 +-FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR) +-FREETYPE2LIB = -L$(FREETYPE2LIBDIR) -lfreetype +-FREETYPE2DEFINES = -DFREETYPE2 +- +- XKBFILELIBSRC = $(LIBSRC)/xkbfile +- +-DEPXKBFILELIB = $(USRLIBDIR)/libxkbfile.a +-XKBFILELIB = -lxkbfile +- +-LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln +- +- XKBCOMPCMD = $(BINDIR)/xkbcomp +- +- XKBUILIBSRC = $(LIBSRC)/xkbui +- +-DEPXKBUILIB = $(USRLIBDIR)/libxkbui.a +-XKBUILIB = -lxkbui +- +-LINTXKBUI = $(LINTLIBDIR)/llib-lxkbui.ln +- +- DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) +- +- DEPLIBS1 = $(DEPLIBS) +- DEPLIBS2 = $(DEPLIBS) +- DEPLIBS3 = $(DEPLIBS) +- DEPLIBS4 = $(DEPLIBS) +- DEPLIBS5 = $(DEPLIBS) +- DEPLIBS6 = $(DEPLIBS) +- DEPLIBS7 = $(DEPLIBS) +- DEPLIBS8 = $(DEPLIBS) +- DEPLIBS9 = $(DEPLIBS) +- DEPLIBS10 = $(DEPLIBS) +- +-XMULIBONLY = -lXmu +-XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) +- +- CONFIGDIR = $(LIBDIR)/config +- +- USRLIBDIRPATH = $(USRLIBDIR) +- LDPRELIBS = -L$(USRLIBDIR) +- LDPOSTLIBS = +- TOP_INCLUDES = -I$(INCROOT) $(TOP_X_INCLUDES) +- PROJECT_DEFINES = +- +-CXXPROJECT_DEFINES = +- +-# ---------------------------------------------------------------------- +-# start of Imakefile +- +-SYS_LIBRARIES = -lm -lXpm +-LOCAL_LIBRARIES = $(XLIB) +-DEPLIBS = $(DEPXLIB) +-SRCS = xsnow.c toon_root.c xsnow.h vroot.h +-OBJS = xsnow.o toon_root.o +- +- PROGRAM = xsnow +- +-all:: xsnow +- +-xsnow: $(OBJS) $(DEPLIBS) +- $(RM) $@ +- $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) +- +-install:: xsnow +- @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ +- else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi +- $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) xsnow $(DESTDIR)$(BINDIR)/xsnow +- +-install.man:: xsnow.man +- @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ +- else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi +- $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) xsnow.man $(DESTDIR)$(MANDIR)/xsnow.$(MANSUFFIX) +- +-depend:: +- $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) +- +-lint: +- $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) +-lint1: +- $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) +- +-clean:: +- $(RM) xsnow +- +-# ---------------------------------------------------------------------- +-# common rules for all Makefiles - do not edit +- +-.c.i: +- $(RM) $@ +- $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ +- +-.SUFFIXES: .s +- +-.c.s: +- $(RM) $@ +- $(CC) -S $(CFLAGS) $(_NOOP_) $*.c +- +-emptyrule:: +- +-clean:: +- $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* +- +-Makefile:: +- -@if [ -f Makefile ]; then set -x; \ +- $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ +- else exit 0; fi +- $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) +- +-tags:: +- $(TAGS) -w *.[ch] +- $(TAGS) -xw *.[ch] > TAGS +- +-man_keywords:: +- +-html_index:: +- +-# ---------------------------------------------------------------------- +-# empty rules for directories that do not have SUBDIRS - do not edit +- +-install:: +- @echo "install in $(CURRENT_DIR) done" +- +-install.man:: +- @echo "install.man in $(CURRENT_DIR) done" +- +-install.sdk:: +- @echo "install.sdk in $(CURRENT_DIR) done" +- +-Makefiles:: +- +-includes:: +- +-depend:: +- +-# ---------------------------------------------------------------------- +-# dependencies generated by makedepend +- +-# DO NOT DELETE +-xsnow.o: xsnow.c /usr/X11R6/include/X11/Intrinsic.h \ +- /usr/X11R6/include/X11/Xlib.h /usr/include/sys/types.h \ +- /usr/include/features.h /usr/include/sys/cdefs.h \ +- /usr/include/gnu/stubs.h /usr/include/bits/types.h \ +- /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h \ +- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ +- /usr/include/sys/select.h /usr/include/bits/select.h \ +- /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ +- /usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \ +- /usr/X11R6/include/X11/Xosdefs.h /usr/X11R6/include/X11/Xutil.h \ +- /usr/X11R6/include/X11/Xresource.h /usr/include/string.h \ +- /usr/X11R6/include/X11/Core.h /usr/X11R6/include/X11/Composite.h \ +- /usr/X11R6/include/X11/Constraint.h /usr/X11R6/include/X11/Object.h \ +- /usr/X11R6/include/X11/RectObj.h /usr/X11R6/include/X11/Xos.h \ +- /usr/include/fcntl.h /usr/include/bits/fcntl.h \ +- /usr/include/sys/stat.h /usr/include/bits/stat.h \ +- /usr/include/unistd.h /usr/include/bits/posix_opt.h \ +- /usr/include/bits/confname.h /usr/include/getopt.h \ +- /usr/include/sys/time.h /usr/include/bits/time.h \ +- /usr/X11R6/include/X11/Xarch.h /usr/X11R6/include/X11/xpm.h \ +- /usr/include/stdio.h \ +- /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h \ +- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ +- /usr/include/bits/wchar.h /usr/include/gconv.h \ +- /usr/include/bits/stdio_lim.h /usr/include/math.h \ +- /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \ +- /usr/include/bits/mathcalls.h \ +- /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/float.h \ +- /usr/include/signal.h /usr/include/bits/signum.h \ +- /usr/include/bits/siginfo.h /usr/include/bits/wordsize.h \ +- /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ +- /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ +- /usr/include/ucontext.h /usr/include/sys/ucontext.h \ +- /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h \ +- /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/syslimits.h \ +- /usr/include/limits.h /usr/include/bits/posix1_lim.h \ +- /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ +- /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ +- /usr/include/stdlib.h /usr/include/bits/waitflags.h \ +- /usr/include/bits/waitstatus.h /usr/include/alloca.h xsnow.h \ +- pixmaps/snow00.xbm pixmaps/snow01.xbm pixmaps/snow02.xbm \ +- pixmaps/snow03.xbm pixmaps/snow04.xbm pixmaps/snow05.xbm \ +- pixmaps/snow06.xbm pixmaps/tannenbaum.xbm pixmaps/BigSanta1.XPM \ +- pixmaps/BigSanta2.XPM pixmaps/BigSanta3.XPM pixmaps/BigSanta4.XPM \ +- pixmaps/BigSantaRudolf1.XPM pixmaps/BigSantaRudolf2.XPM \ +- pixmaps/BigSantaRudolf3.XPM pixmaps/BigSantaRudolf4.XPM \ +- pixmaps/MediumSanta1.XPM pixmaps/MediumSanta2.XPM \ +- pixmaps/MediumSanta3.XPM pixmaps/MediumSanta4.XPM \ +- pixmaps/MediumSantaRudolf1.XPM pixmaps/MediumSantaRudolf2.XPM \ +- pixmaps/MediumSantaRudolf3.XPM pixmaps/MediumSantaRudolf4.XPM \ +- pixmaps/RegularSanta1.XPM pixmaps/RegularSanta2.XPM \ +- pixmaps/RegularSanta3.XPM pixmaps/RegularSanta4.XPM \ +- pixmaps/RegularSantaRudolf1.XPM pixmaps/RegularSantaRudolf2.XPM \ +- pixmaps/RegularSantaRudolf3.XPM pixmaps/RegularSantaRudolf4.XPM \ +- toon.h /usr/X11R6/include/X11/extensions/shape.h +-toon_root.o: toon_root.c toon.h /usr/X11R6/include/X11/Intrinsic.h \ +- /usr/X11R6/include/X11/Xlib.h /usr/include/sys/types.h \ +- /usr/include/features.h /usr/include/sys/cdefs.h \ +- /usr/include/gnu/stubs.h /usr/include/bits/types.h \ +- /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h \ +- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ +- /usr/include/sys/select.h /usr/include/bits/select.h \ +- /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ +- /usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \ +- /usr/X11R6/include/X11/Xosdefs.h /usr/X11R6/include/X11/Xutil.h \ +- /usr/X11R6/include/X11/Xresource.h /usr/include/string.h \ +- /usr/X11R6/include/X11/Core.h /usr/X11R6/include/X11/Composite.h \ +- /usr/X11R6/include/X11/Constraint.h /usr/X11R6/include/X11/Object.h \ +- /usr/X11R6/include/X11/RectObj.h /usr/X11R6/include/X11/Xos.h \ +- /usr/include/fcntl.h /usr/include/bits/fcntl.h \ +- /usr/include/sys/stat.h /usr/include/bits/stat.h \ +- /usr/include/unistd.h /usr/include/bits/posix_opt.h \ +- /usr/include/bits/confname.h /usr/include/getopt.h \ +- /usr/include/sys/time.h /usr/include/bits/time.h \ +- /usr/X11R6/include/X11/Xarch.h /usr/X11R6/include/X11/xpm.h \ +- /usr/X11R6/include/X11/extensions/shape.h \ +- /usr/X11R6/include/X11/Xatom.h /usr/X11R6/include/X11/Xproto.h \ +- /usr/X11R6/include/X11/Xmd.h /usr/X11R6/include/X11/Xprotostr.h \ +- /usr/include/stdio.h \ +- /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h \ +- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ +- /usr/include/bits/wchar.h /usr/include/gconv.h \ +- /usr/include/bits/stdio_lim.h +diff -rupN ./xsnow-1.42/PATCH_LICENSE xsnow-comp-tmp/PATCH_LICENSE +--- ./xsnow-1.42/PATCH_LICENSE 1969-12-31 19:00:00.000000000 -0500 ++++ xsnow-comp-tmp/PATCH_LICENSE 2016-02-27 19:47:13.444837394 -0500 +@@ -0,0 +1,21 @@ ++The MIT License (MIT) ++ ++Copyright (c) 2016 Austin Anderson ++ ++Permission is hereby granted, free of charge, to any person obtaining a copy ++of this software and associated documentation files (the "Software"), to deal ++in the Software without restriction, including without limitation the rights ++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++copies of the Software, and to permit persons to whom the Software is ++furnished to do so, subject to the following conditions: ++ ++The above copyright notice and this permission notice shall be included in all ++copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++SOFTWARE. +diff -rupN ./xsnow-1.42/xsnow.c xsnow-comp-tmp/xsnow.c +--- ./xsnow-1.42/xsnow.c 2001-12-15 18:44:47.000000000 -0500 ++++ xsnow-comp-tmp/xsnow.c 2016-02-27 19:47:13.448170769 -0500 +@@ -212,7 +212,8 @@ + etc. + */ + #define VERSION "Xsnow-1.42, December 14th 2001 by Rick Jansen (rja@euronet.nl)\n\ +-WWW: http://www.euronet.nl/~rja/Xsnow/\n" ++WWW: http://www.euronet.nl/~rja/Xsnow/\n\ ++Compositor patch v1 https://github.com/protractorninja/xsnow-comp-patch\n" + + #ifdef VMS + #include <socket.h> +@@ -253,6 +254,7 @@ typedef int ErrorHandler(); + #endif + Display *display; + int screen; ++Window snowWin; + Window rootWin; + char toon_message[TOON_MESSAGE_LENGTH] = ""; + Window Parent; +@@ -272,6 +274,7 @@ int NoKeepSnow = 0; + int NoKeepSBot = 0; + int NoKeepSWin = 0; + int NoPopuphandling = 1; ++int ForceNewWindow = 0; + int NoWind = 0; + unsigned int borderWidth = 0; + int SnowOffset = 0; +@@ -321,6 +324,7 @@ XRectangle AddRect; + unsigned int RunCounter = 0; + int SantaUpdateFactor = 3; + /* Forward decls */ ++int HasCompositor(); + void Usage(); + void SigHandler(); + void SigHupHandler(); +@@ -506,6 +510,9 @@ char *av[]; + printf("\nThis is %s\n\n", VERSION); + exit(0); + } ++ else if (strcmp(arg, "-nouseroot") == 0) { ++ ForceNewWindow = 1; ++ } + else { + Usage(); + } +@@ -553,10 +560,29 @@ char *av[]; + } + screen = DefaultScreen(display); + rootWin = ToonGetRootWindow(display, screen, &Parent); +- black = BlackPixel(display, screen); +- white = WhitePixel(display, screen); + display_width = DisplayWidth(display, screen); + display_height = DisplayHeight(display, screen); ++ if (HasCompositor(display, screen) || ForceNewWindow) { ++ NoSanta = 1; ++ XVisualInfo vinfo; ++ XMatchVisualInfo(display, DefaultScreen(display), 32, TrueColor, &vinfo); ++ XSetWindowAttributes attr; ++ attr.colormap = XCreateColormap(display, rootWin, vinfo.visual, AllocNone); ++ attr.border_pixel = 0; ++ attr.background_pixel = 0; ++ attr.override_redirect = 1; ++ snowWin = XCreateWindow(display, rootWin, 0, 0, display_width, display_height, 0, vinfo.depth, InputOutput, vinfo.visual, CWColormap | CWBorderPixel | CWBackPixel | CWOverrideRedirect, &attr); ++ XClassHint* hint = XAllocClassHint(); ++ hint->res_name = "xsnow"; ++ hint->res_class = "xsnow"; ++ XSetClassHint(display, snowWin, hint); ++ XMapRaised(display, snowWin); ++ XLowerWindow(display, snowWin); ++ } else { ++ snowWin = rootWin; ++ } ++ black = BlackPixel(display, screen); ++ white = WhitePixel(display, screen); + center_x = display_width / 2; + center_y = display_height / 2; + current_snow_height = display_height; +@@ -566,13 +592,13 @@ char *av[]; + } + for (flake=0; flake<=SNOWFLAKEMAXTYPE; flake++) { + rp = &snowPix[flake]; +- rp->pixmap = XCreateBitmapFromData(display, rootWin, ++ rp->pixmap = XCreateBitmapFromData(display, snowWin, + rp->snowBits, rp->width, rp->height); + if (rp->height > MaxSnowFlakeHeight) MaxSnowFlakeHeight = rp->height; + } + snowflakes = (Snow *)malloc(sizeof(Snow) * MAXSNOWFLAKES); + tp = &tannenbaumPix[0]; +- tp->pixmap = XCreateBitmapFromData(display, rootWin, ++ tp->pixmap = XCreateBitmapFromData(display, snowWin, + tp->tannenbaumBits, tp->width, tp->height); + InitSantaPixymaps(); + redPix = AllocNamedColor(redColor, black); +@@ -581,21 +607,21 @@ char *av[]; + blackPix = AllocNamedColor(blackColor, black); + snowcPix = AllocNamedColor(snowColor, white); + trPix = AllocNamedColor(trColor, black); +- gc = XCreateGC(display, rootWin, 0, NULL); ++ gc = XCreateGC(display, snowWin, 0, NULL); + XGetGCValues(display, gc, 0, &xgcv); + XSetForeground(display, gc, blackPix); + XSetFillStyle(display, gc, FillStippled); + if(strcmp(bgColor,"none") != 0) { + bgPix = AllocNamedColor(bgColor, white); +- XSetWindowBackground(display, rootWin, bgPix); +- XClearWindow(display, rootWin); ++ XSetWindowBackground(display, snowWin, bgPix); ++ XClearWindow(display, snowWin); + XFlush(display); + if (!UseFillForClear) { + printf("\nNote: when using backgrounds of one color also specifying\n"); + printf(" -solidbg MAY greatly improve performance!\n"); + } + else { +- ClearSnowGC = XCreateGC(display, rootWin, 0L, &xgcv); ++ ClearSnowGC = XCreateGC(display, snowWin, 0L, &xgcv); + XCopyGC(display,gc,0,ClearSnowGC); + XSetForeground(display,ClearSnowGC, bgPix); + } +@@ -608,13 +634,13 @@ char *av[]; + exit(1); + } + for (flake=0; flake<=SNOWFLAKEMAXTYPE; flake++) { +- SnowGC[flake] = XCreateGC(display, rootWin, 0L, &xgcv); ++ SnowGC[flake] = XCreateGC(display, snowWin, 0L, &xgcv); + XCopyGC(display,gc,0,SnowGC[flake]); + XSetStipple(display, SnowGC[flake], snowPix[flake].pixmap); + XSetForeground(display,SnowGC[flake],snowcPix); + XSetFillStyle(display, SnowGC[flake], FillStippled); + } +- TreesGC = XCreateGC(display, rootWin, 0L, &xgcv); ++ TreesGC = XCreateGC(display, snowWin, 0L, &xgcv); + XCopyGC(display,gc,0,TreesGC); + XSetStipple(display, TreesGC, tannenbaumPix[0].pixmap); + XSetForeground(display,TreesGC,trPix); +@@ -678,7 +704,7 @@ rc = MWR(1); + ev.xconfigure.width, + ev.xconfigure.height, + ev.xconfigure.border_width, +- (rootWin == ev.xconfigure.event) ++ (snowWin == ev.xconfigure.event) + ); + printf("ConfigureNotify calling DDLT\n"); + #endif +@@ -772,7 +798,7 @@ rc = MWR(1); + XDestroyRegion(PrevWr); + XDestroyRegion(WDR); + XDestroyRegion(rscrr); +- XClearWindow(display, rootWin); ++ XClearWindow(display, snowWin); + XCloseDisplay(display); + exit(0); + } /* End of the snow */ +@@ -809,6 +835,7 @@ Usage() + USEPRT(" -nokeepsnowonwindows\n"); + USEPRT(" -nokeepsnowonscreen\n"); + USEPRT(" -nonopopup\n"); ++ USEPRT(" -nouseroot\n"); + USEPRT(" -version\n\n"); + USEPRT("Recommended: xsnow -bg SkyBlue3\n"); + exit(1); +@@ -827,7 +854,7 @@ SigHupHandler() + XSetForeground(display,FurGC,trPix); + XSetFillStyle(display,FurGC, FillSolid); + XSetRegion(display,FurGC,snscr); +- XFillRectangle(display,rootWin,FurGC,0,0,display_width,display_height); ++ XFillRectangle(display,snowWin,FurGC,0,0,display_width,display_height); + XFlush(display); + signal(SIGHUP, Sig_Hup_ptr); + } +@@ -1002,7 +1029,7 @@ int rx; + Snow *snow; + snow = &snowflakes[rx]; + XSetTSOrigin(display, SnowGC[snow->whatFlake], snow->intX, snow->intY); +- XFillRectangle(display, rootWin, SnowGC[snow->whatFlake], ++ XFillRectangle(display, snowWin, SnowGC[snow->whatFlake], + snow->intX, snow->intY, + snowPix[snow->whatFlake].width, snowPix[snow->whatFlake].height); + } +@@ -1015,13 +1042,13 @@ int rx; + snow = &snowflakes[rx]; + + if (UseFillForClear) { +- XFillRectangle(display, rootWin, ClearSnowGC, ++ XFillRectangle(display, snowWin, ClearSnowGC, + snow->intX, snow->intY, + snowPix[snow->whatFlake].width, + snowPix[snow->whatFlake].height); + } + else { +- XClearArea(display, rootWin, ++ XClearArea(display, snowWin, + snow->intX, snow->intY, + snowPix[snow->whatFlake].width, + snowPix[snow->whatFlake].height, +@@ -1050,7 +1077,7 @@ DrawTannenbaum(x,y) + int x,y; + { + XSetTSOrigin(display, TreesGC, x,y); +- XFillRectangle(display, rootWin, TreesGC, ++ XFillRectangle(display, snowWin, TreesGC, + x,y, + tannenbaumPix[0].width, tannenbaumPix[0].height); + } +@@ -1065,49 +1092,49 @@ void InitSantaPixymaps() + switch (SantaSize) { + case 0: + if (!Rudolf) { +- rc = XpmCreatePixmapFromData( display, rootWin, RegularSanta1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, RegularSanta2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, RegularSanta3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, RegularSanta4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, RegularSanta1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, RegularSanta2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, RegularSanta3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, RegularSanta4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); + sscanf(*RegularSanta1,"%d %d", &SantaWidth,&SantaHeight); + } + else { +- rc = XpmCreatePixmapFromData( display, rootWin, RegularSantaRudolf1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, RegularSantaRudolf2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, RegularSantaRudolf3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, RegularSantaRudolf4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, RegularSantaRudolf1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, RegularSantaRudolf2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, RegularSantaRudolf3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, RegularSantaRudolf4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); + sscanf(*RegularSantaRudolf1,"%d %d", &SantaWidth,&SantaHeight); + } + break; + case 1: + if (!Rudolf) { +- rc = XpmCreatePixmapFromData( display, rootWin, MediumSanta1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, MediumSanta2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, MediumSanta3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, MediumSanta4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, MediumSanta1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, MediumSanta2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, MediumSanta3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, MediumSanta4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); + sscanf(*MediumSanta1,"%d %d", &SantaWidth,&SantaHeight); + } + else { +- rc = XpmCreatePixmapFromData( display, rootWin, MediumSantaRudolf1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, MediumSantaRudolf2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, MediumSantaRudolf3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, MediumSantaRudolf4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, MediumSantaRudolf1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, MediumSantaRudolf2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, MediumSantaRudolf3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, MediumSantaRudolf4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); + sscanf(*MediumSantaRudolf1,"%d %d", &SantaWidth,&SantaHeight); + } + break; + case 2: + if (!Rudolf) { +- rc = XpmCreatePixmapFromData( display, rootWin, BigSanta1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, BigSanta2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, BigSanta3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, BigSanta4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, BigSanta1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, BigSanta2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, BigSanta3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, BigSanta4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); + sscanf(*BigSanta1,"%d %d", &SantaWidth,&SantaHeight); + } + else { +- rc = XpmCreatePixmapFromData( display, rootWin, BigSantaRudolf1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, BigSantaRudolf2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, BigSantaRudolf3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); +- rc = XpmCreatePixmapFromData( display, rootWin, BigSantaRudolf4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, BigSantaRudolf1, &SantaPixmap[0], &SantaMaskPixmap[0], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, BigSantaRudolf2, &SantaPixmap[1], &SantaMaskPixmap[1], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, BigSantaRudolf3, &SantaPixmap[2], &SantaMaskPixmap[2], NULL); ++ rc = XpmCreatePixmapFromData( display, snowWin, BigSantaRudolf4, &SantaPixmap[3], &SantaMaskPixmap[3], NULL); + sscanf(*BigSantaRudolf1,"%d %d", &SantaWidth,&SantaHeight); + } + break; +@@ -1196,7 +1223,7 @@ DrawSanta() { + SantaX,SantaY); + rc = XCopyArea( display, + SantaPixmap[CurrentSanta], +- rootWin, ++ snowWin, + gc, + 0,0,SantaWidth,SantaHeight, + SantaX,SantaY); +@@ -1209,7 +1236,7 @@ DrawSanta() { + void + EraseSanta() + { +- XClearArea(display, rootWin, ++ XClearArea(display, snowWin, + SantaX , SantaY, + SantaWidth,SantaHeight, + False); +@@ -1245,6 +1272,17 @@ Pixel dfltPix; + return pix; + } + /* ------------------------------------------------------------------ */ ++int ++HasCompositor(dpy, screen) ++Display * dpy; ++int screen; ++{ ++ char prop_name[20]; ++ snprintf(prop_name, 20, "_NET_WM_CM_S%d", screen); ++ Atom prop_atom = XInternAtom(dpy, prop_name, False); ++ return XGetSelectionOwner(dpy, prop_atom) != None; ++} ++/* ------------------------------------------------------------------ */ + void sig_alarm() + { + int rand=RandInt(100); +@@ -1405,7 +1443,7 @@ int DDLT() { + printf("DDLT: diffR: (%d,%d,%d,%d)\n", + DiffRect.x,DiffRect.y,DiffRect.x+DiffRect.width,DiffRect.y+DiffRect.height); + #endif +- if (0) XClearArea(display, rootWin, ++ if (0) XClearArea(display, snowWin, + DiffRect.x, + DiffRect.y, + DiffRect.width, +@@ -1470,7 +1508,7 @@ int ClearX, ClearY; + #if debug + printf("HEAr: clearing (%d,%d,%d,%d)\n", AddX,AddY,AddRect.width,AddRect.height); + #endif +- XClearArea(display, rootWin, ++ XClearArea(display, snowWin, + AddX, + AddY, + AddRect.width, +@@ -1479,3 +1517,4 @@ int ClearX, ClearY; + XSubtractRegion(snscr,SubR, snscr); + XDestroyRegion(SubR); + } ++/* vim: set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab : */ +diff -rupN ./xsnow-1.42/xsnow.hlp xsnow-comp-tmp/xsnow.hlp +--- ./xsnow-1.42/xsnow.hlp 2000-12-19 15:26:36.000000000 -0500 ++++ xsnow-comp-tmp/xsnow.hlp 2016-02-27 19:47:13.448170769 -0500 +@@ -99,6 +99,12 @@ + all windows, then specify this option. Symptom would be that no snow is + kept on any window, but only at the screen bottom + ++ -nouseroot ++ Do not draw on the desktop's root window; instead, create a new window ++ underneath all others and draw there. Should be automatically enabled if ++ you are using a compositing window manger. Also useful if you want to set ++ a background color (with -bg) that won't remain after xsnow exits. ++ + -version + Prints the current Xsnow version. + +diff -rupN ./xsnow-1.42/xsnow.man xsnow-comp-tmp/xsnow.man +--- ./xsnow-1.42/xsnow.man 2001-12-15 18:11:04.000000000 -0500 ++++ xsnow-comp-tmp/xsnow.man 2016-02-27 19:47:13.448170769 -0500 +@@ -107,6 +107,12 @@ nature. If however, you use an Xserver t + all windows, then specify this option. Symptom would be that no snow + is kept on any window, but only at the screen bottom. + .TP 8 ++-nouseroot ++Do not draw on the desktop's root window; instead, create a new window ++underneath all others and draw there. Should be automatically enabled if ++you are using a compositing window manger. Also useful if you want to set ++a background color (with -bg) that won't remain after xsnow exits. ++.TP 8 + -version + Prints the current Xsnow version and does not start Xsnow. + The current version (of this man page) is 1.42, December 14th 2001 |