diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/lcd4linux |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/lcd4linux')
-rw-r--r-- | app-misc/lcd4linux/Manifest | 12 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-autoconf-2.65.patch | 20 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-missing-header.patch | 12 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-mpd.patch | 374 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-nordtsc.patch | 187 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-usbdebug.patch | 121 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-warnings.patch | 64 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2.initd | 22 | ||||
-rw-r--r-- | app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r4.ebuild | 174 | ||||
-rw-r--r-- | app-misc/lcd4linux/metadata.xml | 14 |
10 files changed, 1000 insertions, 0 deletions
diff --git a/app-misc/lcd4linux/Manifest b/app-misc/lcd4linux/Manifest new file mode 100644 index 000000000000..b0d3f04cd695 --- /dev/null +++ b/app-misc/lcd4linux/Manifest @@ -0,0 +1,12 @@ +AUX lcd4linux-0.10.1_rc2-autoconf-2.65.patch 593 SHA256 7aab2efe60f6914da17c30b075ec127e07e4dc815f834c49017723baf02ba2be SHA512 55f09599fa894f9ce7aa128e708d7c7bc145630d0db6ec31b04302cdf9df19aec12a05debf66dc8fb8cf6b657f3f6c430ae6615a946c7d84a7b6875880241bb2 WHIRLPOOL bfebdf769cb3aaeefc8b0e01c72f46146e74e91fb265f7c8900501abf8dbffd93e2ba7167f5be69e2e9f813b50d0e483d65d316316a67fc63181405efb9ec245 +AUX lcd4linux-0.10.1_rc2-missing-header.patch 337 SHA256 39dca4b3a224f006c8c5b065d1a51f494b985d73b8a2e04e39fc5b88bc12684d SHA512 3bec09fbd773565945c925a39412223e1f59db2752290ba945d254ccdf826b8789162c7482d98feca8ebd0dde14be7ce18c46fb7c4d98cd9c4129d4e96dfea89 WHIRLPOOL 53b10ecab7bcb8d02e3f86920bffa62737d77efba73b4af30aa8da51d79a2d68a8ae3b1453f50eec4af944dfa015d69da747efa72c1ce89d1551c29910fd4936 +AUX lcd4linux-0.10.1_rc2-mpd.patch 9230 SHA256 ee1294d4c53086b998f1ff3fa90987b5a58baa589850b77edab755ef836b1583 SHA512 8763f22deb728d5bfbd4ae601c3cc8808ada042374b604a3787429497373d6d52cbe48f72be37d149f823debfdc740b2a23db5fe2e20ab1091743f2d6ba186af WHIRLPOOL 0fee25e461f1cc2b759b2e90981a2f8f0176354b8c287d5a8b72fc5a70ee50fe2bc4c7034401ab8807bf1b1bd50ea30abf7d4bfde6940f8a2dc861ec3c1084c7 +AUX lcd4linux-0.10.1_rc2-nordtsc.patch 4703 SHA256 f0520872c820003e78f90304c0e36511e53d11cf67732eb4debb44cc68697e34 SHA512 fb0579cde4ce812e4f26a3e30f0b223c9dbafd07ccf297dffb8ba50bc757f2a7a01c37d456b4a8c8b5ec616a4b694d2efd11a55d1f2e20f4397bfcdda1d59585 WHIRLPOOL 231e3691e3ce001ec91db75e1ccd22b5e632e3afa724f91034d0a09bf5bef1daaa8e58f137fe73e8394c7c850e798c1c550b218b640cf8588ba51c96f2ae08d5 +AUX lcd4linux-0.10.1_rc2-usbdebug.patch 3032 SHA256 42b37f27aba233c1f95ad05b9931b860af2711dfc2c6440a2054fbc2d0ea90cc SHA512 252ebab0e125c2189178f1de35c46d398f79d4b5fd4ff5b92c72874e95c7b45c25eaa92b600a8d5a160e4e45c265f69b6240123c6d2ec4076c7947659e46ae46 WHIRLPOOL cf3995d82e5549c84218915ba8c0ca6bc1fa004b876956ab3e8083e7dc8346e0444f332bae19dd2501438f4379213ed23914f4f8bab824c58b953fe47a0cc701 +AUX lcd4linux-0.10.1_rc2-warnings.patch 2229 SHA256 8960a45af139e2f2d226474c9d5f099ca70605bb72815b03d9ad72222be7b8d5 SHA512 ee6b163dc93f2913c629b056ec79cffaecbdb9124d187be8e616e10cc3cec917d98cc8131fda9d3b310530c00cd61dc1617dce4f54143c77962cbc0c58f4d615 WHIRLPOOL 2b169b7d2248bddda2a03685263726247bac062e7b0fb4b6a28eb5add194941c27d955c3b5ad4d1775c6959e5b3661920ac86f8d660c5d209b1bfa907cc04add +AUX lcd4linux-0.10.1_rc2.initd 539 SHA256 c694632b5db4b92fcc5c69d2682ca0a331ce6207a0a28f54d76c9b086f2a8072 SHA512 c3f6cc42bb6c0d7ecaa180c28c0d9a9530b32dca97cb563960a0c30ca9cbed80a7b249f970d791ba034f115ef22218feac7a449ab6fe69109a1427565d62be07 WHIRLPOOL e6274296d9a134c07985f6574744de1db590e9c2ad6ac74605b479c64c4968fd64c4373b4cf7d41dbf6b068481bd76ed7ea0885fda680124c77a6cf02a4f46ad +DIST lcd4linux-0.10.1-RC2.tar.gz 386188 SHA256 9e69ded08dc9a8c75f36a3c020e7aa96b90313d91b2f58add6d4dfff1f8861b0 SHA512 8c4299f50ab4068d4106ba32309f4f66bfedf382a4aed7495cf400d22c57c22c4dfabd80f7e4355417c5c0d964e69f0c268a50bae6924b759b720bd728a969f9 WHIRLPOOL 71c4189e4e9a229e448d44097c2d6e5ab7c71fa97a92815438307f728b86ee238a114a14c73511e473f4c26bbc52a8b67a1a00693c7ef789c909b64165a3f075 +EBUILD lcd4linux-0.10.1_rc2-r4.ebuild 5156 SHA256 2a188ea86f6ebe24a0e6fc30174f580c1242e6604568978d7f7c8a90cf561c58 SHA512 a17a33cbeac88b0eec6a6d5fb8435667f3f9d5c33bb77e360ba7d755f6c3c138d3d6a7ee87c83eee4f4679d4df59dc27457a61ed108c0a11ed30d2dbf8d4b1d9 WHIRLPOOL 42ab4ec728734729e186201bc9fdf6a45790340080ab1b9f3c6b3fd61ecf28b483b0b7c3303d0fe809f22c867e8f50ff599a4ee732c937183ce8950ef93a41ab +MISC ChangeLog 4068 SHA256 e57dc7e8eb73999643b0ab5c687af14dd04534110eb4308a164cd01749d9d0f1 SHA512 7e5b5cd77f2fceef55a569f4b1c8fab8f71e7c26eeba7837d45f336b54dff2b3e559e1ed6512946aadda226fbf56cc45087381a9292a5c68c9e499d123c7e400 WHIRLPOOL 559752f24152507474adbf9c83e5276c8fb98d065de0a3f271e83d278383b0dada2c40ad5bfef07e73bb8a31a143562acaf967f60ed45cb61151cb7a3cb3f6d9 +MISC ChangeLog-2015 8740 SHA256 10936a56c12340d922f78a14549df92ed5c830de975c9bb6e85db42b11560c44 SHA512 65b3a1034f3af6bcd2f9b2c095403e7c75e10285a658faf2f2a16841f7144897abc3e1744d9c4f79e29137fc4ab3bce59a5ed2c441f25e471984b8499c7c3f6c WHIRLPOOL 6c5ab7e6054373573fc7ba8a9f1a00f025e9535b20356ccbcccd2db4a7c80280f97e0946c43a4317cc9e7656f89c82194be6b078109a5b99e4faab1efe6f7ec1 +MISC metadata.xml 563 SHA256 abe221ec09199d9985d1f656959312a650a1339ce26ad5cf7aaf7bf2241baf9f SHA512 74c04fe6e8bc22b8b57d83062459c7daae1d003f86aec1318f7701389627443026a4b070d864df85b270a26c0f2882d9333bd07b4d6572b9a9b3380d5dbf40f0 WHIRLPOOL f69aa615559f5f59be8a51c9aeac2e9d00f1615af4e378a736af1a6c6e2a3d0a929f76e9c6df60c3a22f06f569ddb119b622120063527e0778859d22114fbf87 diff --git a/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-autoconf-2.65.patch b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-autoconf-2.65.patch new file mode 100644 index 000000000000..6b176a6ecf64 --- /dev/null +++ b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-autoconf-2.65.patch @@ -0,0 +1,20 @@ +--- ac_python_devel.m4.orig 2010-03-06 01:28:40.000000000 +0200 ++++ ac_python_devel.m4 2010-03-06 01:29:47.000000000 +0200 +@@ -68,7 +68,7 @@ + PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. + Moreover, to disable this check, set PYTHON_NOVERSIONCHECK + to something else than an empty string. +-])dnl ++]) + else + AC_MSG_RESULT([skip at user request]) + fi +@@ -92,7 +92,7 @@ + If you have it installed, but it isn't the default Python + interpreter in your system path, please pass the PYTHON_VERSION + variable to configure. See ``configure --help'' for reference. +-])dnl ++]) + fi + fi + diff --git a/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-missing-header.patch b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-missing-header.patch new file mode 100644 index 000000000000..6b38dc038c4a --- /dev/null +++ b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-missing-header.patch @@ -0,0 +1,12 @@ +diff -ur lcd4linux-0.10.1-RC2.orig/lcd4linux.c lcd4linux-0.10.1-RC2/lcdinux-0.10.1-RC2/lcd4linux.c +--- lcd4linux.c 2007-03-22 15:10:41.000000000 +0900 ++++ lcd4linux.c 2011-11-23 12:12:03.782869315 +0800 +@@ -26,7 +26,7 @@ + */ + + #include "config.h" +- ++#include <sys/stat.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> diff --git a/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-mpd.patch b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-mpd.patch new file mode 100644 index 000000000000..c3fa8ac36350 --- /dev/null +++ b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-mpd.patch @@ -0,0 +1,374 @@ +Patch for >=lcd4linux-0.10.1_rc2-r1 + +Fixes memory and other bugs in plugin_mpd + +Accepted upstream + +Index: plugin_mpd.c +=================================================================== +--- plugin_mpd.c (Revision 801) ++++ plugin_mpd.c (Arbeitskopie) +@@ -4,6 +4,7 @@ + * mpd informations + * + * Copyright (C) 2006 Stefan Kuhne <sk-privat@gmx.net> ++ * Copyright (C) 2007 Robert Buchholz <rbu@gentoo.org> + * Copyright (C) 2006 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> + * + * This file is part of LCD4Linux. +@@ -81,8 +82,8 @@ + + iport = strtol(port, &test, 10); + +- if (iport < 0 || *test != '\0') { +- fprintf(stderr, "MPD_PORT \"%s\" is not a positive integer\n", port); ++ if ((iport < 0) || (*test != '\0')) { ++ error("[MPD] MPD_PORT \"%s\" is not a positive integer\n", port); + exit(EXIT_FAILURE); + } + +@@ -94,17 +95,16 @@ + mpd_sendCommandListEnd(mpd.conn); + + if ((mpd.status = mpd_getStatus(mpd.conn)) == NULL) { +- fprintf(stderr, "%s\n", mpd.conn->errorStr); ++ error("[MPD] error when getting status: %s\n", mpd.conn->errorStr); + mpd_closeConnection(mpd.conn); +- } +- +- if (mpd.status->error) { +- printf("error: %s\n", mpd.status->error); +- } +- +- if (mpd.conn->error) { +- fprintf(stderr, "%s\n", mpd.conn->errorStr); ++ mpd.conn = NULL; ++ } else if (mpd.status->error) { ++ info("[MPD] status error when connecting: %s\n", mpd.status->error); ++ } else if (mpd.conn->error) { ++ error("[MPD] error when connecting: %s\n", mpd.conn->errorStr); ++ mpd_freeStatus(mpd.status); + mpd_closeConnection(mpd.conn); ++ mpd.conn = NULL; + } + + return mpd; +@@ -114,14 +114,15 @@ + static void disconnect(struct Pointer mpd) + { + if (mpd.conn->error) { +- fprintf(stderr, "%s\n", mpd.conn->errorStr); ++ error("[MPD] error when disconnecting: %s\n", mpd.conn->errorStr); ++ mpd_freeStatus(mpd.status); + mpd_closeConnection(mpd.conn); ++ return; + } + + mpd_finishCommand(mpd.conn); + if (mpd.conn->error) { +- fprintf(stderr, "%s\n", mpd.conn->errorStr); +- mpd_closeConnection(mpd.conn); ++ error("[MPD] error when disconnecting: %s\n", mpd.conn->errorStr); + } + + mpd_freeStatus(mpd.status); +@@ -132,8 +133,12 @@ + + static void artist(RESULT * result, RESULT * query) + { +- char *value = " "; ++ char *value = NULL; + struct Pointer mpd = connect(); ++ if (mpd.conn == NULL) { ++ SetResult(&result, R_STRING, " "); ++ return; ++ } + + mpd_nextListOkCommand(mpd.conn); + +@@ -145,9 +150,10 @@ + continue; + } + +- if (song->artist) { ++ if (!value && song->artist) { ++ /* we found our first song */ + value = strdup(song->artist); +- //add comment ++ /* add comment */ + if (query) { + char *myarg; + myarg = strdup(R2S(query)); +@@ -160,8 +166,8 @@ + + disconnect(mpd); + +- /* store result */ +- SetResult(&result, R_STRING, value); ++ /* store result, value must not be NULL */ ++ SetResult(&result, R_STRING, value ? value : " "); + + free(value); + } +@@ -169,8 +175,12 @@ + + static void title(RESULT * result) + { +- char *value = " "; ++ char *value = NULL; + struct Pointer mpd = connect(); ++ if (mpd.conn == NULL) { ++ SetResult(&result, R_STRING, " "); ++ return; ++ } + + mpd_nextListOkCommand(mpd.conn); + +@@ -182,7 +192,7 @@ + continue; + } + +- if (song->title) { ++ if (!value && song->title) { + value = strdup(song->title); + } + mpd_freeInfoEntity(mpd.entity); +@@ -190,8 +200,8 @@ + + disconnect(mpd); + +- /* store result */ +- SetResult(&result, R_STRING, value); ++ /* store result, value must not be NULL */ ++ SetResult(&result, R_STRING, value ? value : " "); + + free(value); + } +@@ -199,8 +209,12 @@ + + static void album(RESULT * result) + { +- char *value = " "; ++ char *value = NULL; + struct Pointer mpd = connect(); ++ if (mpd.conn == NULL) { ++ SetResult(&result, R_STRING, " "); ++ return; ++ } + + mpd_nextListOkCommand(mpd.conn); + +@@ -212,7 +226,7 @@ + continue; + } + +- if (song->album) { ++ if (!value && song->album) { + value = strdup(song->album); + } + mpd_freeInfoEntity(mpd.entity); +@@ -220,8 +234,8 @@ + + disconnect(mpd); + +- /* store result */ +- SetResult(&result, R_STRING, value); ++ /* store result, value must not be NULL */ ++ SetResult(&result, R_STRING, value ? value : " "); + + free(value); + } +@@ -236,7 +250,7 @@ + void error_callback( __attribute__ ((unused)) MpdObj * mi, int errorid, char *msg, __attribute__ ((unused)) + void *userdata) + { +- printf("Error %i: '%s'\n", errorid, msg); ++ info("[MPD] caught error %i: '%s'\n", errorid, msg); + } + + static int mpd_get(int function) +@@ -278,95 +292,89 @@ + + static void elapsedTime(RESULT * result) + { +- char *value = " "; ++ char myTime[6] = " "; + +- int playTime = mpd_get(_mpd_status_get_elapsed_song_time); ++ const int playTime = mpd_get(_mpd_status_get_elapsed_song_time); + +- if (playTime != -1) { +- char myTime[6]; +- memset(myTime, 0, 6); +- int minutes = (int) (playTime / 60); +- int seconds = (int) (playTime % 60); ++ if ((playTime >= 0) && (playTime < 6000)) { ++ const int minutes = (int) (playTime / 60); ++ const int seconds = (int) (playTime % 60); + sprintf(myTime, "%02d:%02d", minutes, seconds); ++ } else if (playTime >= 6000) { ++ strcpy(myTime, "LONG"); ++ } + +- value = strdup(myTime); +- } +- // store result +- SetResult(&result, R_STRING, value); ++ /* store result */ ++ SetResult(&result, R_STRING, myTime); + } + + static void elapsedTimeSec(RESULT * result) + { +- int playTime = mpd_get(_mpd_status_get_elapsed_song_time); ++ const int playTime = mpd_get(_mpd_status_get_elapsed_song_time); + double d = 0.0; + + if (playTime != -1) + d = playTime; + +- // store result ++ /* store result */ + SetResult(&result, R_NUMBER, &d); + } + + static void totalTime(RESULT * result) + { +- char *value = " "; ++ char myTime[6] = "ERROR"; + +- int totTime = mpd_get(_mpd_status_get_total_song_time); +- if (totTime != -1) { +- char myTime[6]; +- memset(myTime, 0, 6); +- int minutes = (int) (totTime / 60); +- int seconds = (int) (totTime % 60); ++ const int totTime = mpd_get(_mpd_status_get_total_song_time); ++ if ((totTime >= 0) && (totTime < 6000)) { ++ const int minutes = (int) (totTime / 60); ++ const int seconds = (int) (totTime % 60); + sprintf(myTime, "%02d:%02d", minutes, seconds); ++ } else if (totTime >= 6000) { ++ strcpy(myTime, "LONG"); ++ } + +- value = strdup(myTime); +- } else +- value = strdup("ERROR"); +- // store result +- SetResult(&result, R_STRING, value); ++ /* store result */ ++ SetResult(&result, R_STRING, myTime); + } + + static void totalTimeSec(RESULT * result) + { +- int totTime = mpd_get(_mpd_status_get_total_song_time); ++ const int totTime = mpd_get(_mpd_status_get_total_song_time); + double d = 0.0; + + if (totTime != -1) + d = totTime; + +- // store result ++ /* store result */ + SetResult(&result, R_NUMBER, &d); + } + + static void bitRate(RESULT * result) + { +- char *value = ""; ++ char rateStr[4]; + +- int rate = mpd_get(_mpd_status_get_bitrate); ++ const int rate = mpd_get(_mpd_status_get_bitrate); + +- if (rate != -1) { +- char rateStr[4]; +- memset(rateStr, 0, 4); ++ if ((rate >= 0) && (rate < 1000)) { + sprintf(rateStr, "%03d", rate); ++ } + +- value = strdup(rateStr); +- } +- // store result +- SetResult(&result, R_STRING, value); ++ /* store result */ ++ SetResult(&result, R_STRING, rateStr); + } + + static void getRepeat(RESULT * result) + { + char *value = " "; + +- int rep = mpd_get(_mpd_player_get_repeat); ++ const int rep = mpd_get(_mpd_player_get_repeat); + + if (rep != -1) { + if (rep) +- value = strdup("REP"); +- // else value = strdup(" "); ++ value = "REP"; ++ /* else value = strdup(" "); */ + } +- // store result ++ /* store result */ + SetResult(&result, R_STRING, value); + } + +@@ -375,26 +383,26 @@ + { + char *value = " "; + +- int ran = mpd_get(_mpd_player_get_random); ++ const int ran = mpd_get(_mpd_player_get_random); + + if (ran != -1) { + if (ran) + value = strdup("RND"); +- // else value = strdup(" "); ++ /* else value = strdup(" "); */ + } +- // store result ++ /* store result */ + SetResult(&result, R_STRING, value); + } + + static void getRepRand(RESULT * result) + { +- char *value = " "; ++ char str[9] = " "; + +- int ran = mpd_get(_mpd_player_get_random); +- int rep = mpd_get(_mpd_player_get_repeat); ++ const int ran = mpd_get(_mpd_player_get_random); ++ const int rep = mpd_get(_mpd_player_get_repeat); + + if (ran != -1 && rep != -1) { +- char str[9]; ++ + if (rep) + sprintf(str, "REP/"); + else +@@ -403,17 +411,16 @@ + sprintf(str, "%sRND", str); + else + sprintf(str, "%s---", str); +- value = strdup(str); + } +- // store result +- SetResult(&result, R_STRING, value); ++ /* store result */ ++ SetResult(&result, R_STRING, str); + } + + int plugin_init_mpd(void) + { + /* Check for File */ + if (mpd_get(_mpd_dummy) != 1) { +- error("Error: Cannot connect to MPD! Is MPD started?"); ++ error("[MPD] Error: Cannot connect to MPD! Is MPD started?"); + return -1; + } + diff --git a/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-nordtsc.patch b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-nordtsc.patch new file mode 100644 index 000000000000..b25d01e8e901 --- /dev/null +++ b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-nordtsc.patch @@ -0,0 +1,187 @@ +kMessage-ID: <47011930.60100@reinelt.co.at> +Date: Mon, 01 Oct 2007 17:58:40 +0200 +From: Michael Reinelt <michael@reinelt.co.at> +Subject: [Lcd4linux-devel] asm/msr.h inclusion and RDTSC stuff removed + +Hi there, + +I just committed a changeset where I removed the whole RDTSC delay loop +stuff, and therefore lcd4linux does no longer need asm/msr.h + +Instead, a gettimeofday() delay loop will be used when necessary. + +The rdtsc stuff worked fine, but had two major disadvantages: It did not +work with variable CPU frequencies, and latest kernels do no longer +offer the rdtsc() macro. + +The changeset has been committed to trunk, and will be backported to the +0.10.1 branch as soon as I get some positive feedback 8or at least I +don't get any negative feedback) + + +bye, Michael + +-- +Michael Reinelt <michael@reinelt.co.at> +http://home.pages.at/reinelt +GPG-Key 0xDF13BA50 +ICQ #288386781 + +Index: configure.in +=================================================================== +--- lcd4linux-0.10.1-RC2/configure.in.orig ++++ lcd4linux-0.10.1-RC2/configure.in +@@ -99,7 +99,6 @@ AC_HEADER_STDC + AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h sys/vfs.h syslog.h termios.h unistd.h]) + AC_CHECK_HEADERS(sys/io.h asm/io.h) + AC_CHECK_HEADERS(linux/parport.h linux/ppdev.h) +-AC_CHECK_HEADERS(asm/msr.h) + + # Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +Index: udelay.c +=================================================================== +--- lcd4linux-0.10.1-RC2/udelay.c.orig ++++ lcd4linux-0.10.1-RC2/udelay.c +@@ -55,11 +55,6 @@ + #include <string.h> + #include <sys/time.h> + +-#ifdef HAVE_ASM_MSR_H +-#define u32 unsigned int +-#include <asm/msr.h> +-#endif +- + + #include "debug.h" + #include "cfg.h" +@@ -67,79 +62,10 @@ + #include "udelay.h" + + +-static unsigned int ticks_per_usec = 0; +- +- +-static void getCPUinfo(int *hasTSC, double *MHz) +-{ +- int fd; +- char buffer[4096], *p; +- +- *hasTSC = 0; +- *MHz = -1; +- +- fd = open("/proc/cpuinfo", O_RDONLY); +- if (fd == -1) { +- error("udelay: open(/proc/cpuinfo) failed: %s", strerror(errno)); +- return; +- } +- if (read(fd, &buffer, sizeof(buffer) - 1) == -1) { +- error("udelay: read(/proc/cpuinfo) failed: %s", strerror(errno)); +- close(fd); +- return; +- } +- close(fd); +- +- p = strstr(buffer, "flags"); +- if (p == NULL) { +- info("udelay: /proc/cpuinfo has no 'flags' line"); +- } else { +- p = strstr(p, "tsc"); +- if (p == NULL) { +- info("udelay: CPU does not support Time Stamp Counter"); +- } else { +- info("udelay: CPU supports Time Stamp Counter"); +- *hasTSC = 1; +- } +- } +- +- p = strstr(buffer, "cpu MHz"); +- if (p == NULL) { +- info("udelay: /proc/cpuinfo has no 'cpu MHz' line"); +- } else { +- if (sscanf(p + 7, " : %lf", MHz) != 1) { +- error("udelay: parse(/proc/cpuinfo) failed: unknown 'cpu MHz' format"); +- *MHz = -1; +- } else { +- info("udelay: CPU runs at %f MHz", *MHz); +- } +- } +- +-} +- + + void udelay_init(void) + { +-#ifdef HAVE_ASM_MSR_H +- +- int tsc; +- double mhz; +- +- getCPUinfo(&tsc, &mhz); +- +- if (tsc && mhz > 0.0) { +- ticks_per_usec = ceil(mhz); +- info("udelay: using TSC delay loop, %u ticks per microsecond", ticks_per_usec); +- } else +-#else +- error("udelay: The file 'include/asm/msr.h' was missing at compile time."); +- error("udelay: Even if your CPU supports TSC, it will not be used!"); +- error("udelay: You *really* should install msr.h and recompile LCD4linux!"); +-#endif +- { +- ticks_per_usec = 0; +- info("udelay: using gettimeofday() delay loop"); +- } ++ info("udelay: using gettimeofday() delay loop"); + } + + +@@ -172,37 +98,17 @@ unsigned long timing(const char *driver, + void ndelay(const unsigned long nsec) + { + +-#ifdef HAVE_ASM_MSR_H +- +- if (ticks_per_usec) { ++ struct timeval now, end; + +- unsigned int t1, t2; +- unsigned long tsc; +- +- tsc = (nsec * ticks_per_usec + 999) / 1000; +- +- rdtscl(t1); +- do { +- rep_nop(); +- rdtscl(t2); +- } while ((t2 - t1) < tsc); +- +- } else +-#endif +- +- { +- struct timeval now, end; +- +- gettimeofday(&end, NULL); +- end.tv_usec += (nsec + 999) / 1000; +- while (end.tv_usec > 1000000) { +- end.tv_usec -= 1000000; +- end.tv_sec++; +- } +- +- do { +- rep_nop(); +- gettimeofday(&now, NULL); +- } while (now.tv_sec == end.tv_sec ? now.tv_usec < end.tv_usec : now.tv_sec < end.tv_sec); ++ gettimeofday(&end, NULL); ++ end.tv_usec += (nsec + 999) / 1000; ++ while (end.tv_usec > 1000000) { ++ end.tv_usec -= 1000000; ++ end.tv_sec++; + } ++ ++ do { ++ rep_nop(); ++ gettimeofday(&now, NULL); ++ } while (now.tv_sec == end.tv_sec ? now.tv_usec < end.tv_usec : now.tv_sec < end.tv_sec); + } diff --git a/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-usbdebug.patch b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-usbdebug.patch new file mode 100644 index 000000000000..6ecc7a248990 --- /dev/null +++ b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-usbdebug.patch @@ -0,0 +1,121 @@ +diff -crB lcd4linux-0.10.1-RC2-orig/drv_BWCT.c lcd4linux-0.10.1-RC2/drv_BWCT.c +*** lcd4linux-0.10.1-RC2-orig/drv_BWCT.c 2007-02-25 13:39:09.000000000 +0100 +--- lcd4linux-0.10.1-RC2/drv_BWCT.c 2013-11-10 21:32:06.119047221 +0100 +*************** +*** 72,78 **** + static usb_dev_handle *lcd; + static int interface; + +- extern int usb_debug; + extern int got_signal; + + +--- 72,77 ---- +*************** +*** 89,96 **** + + info("%s: scanning USB for BWCT LCD...", Name); + +- usb_debug = 0; +- + usb_init(); + usb_find_busses(); + usb_find_devices(); +--- 88,93 ---- +diff -crB lcd4linux-0.10.1-RC2-orig/drv_LCD2USB.c lcd4linux-0.10.1-RC2/drv_LCD2USB.c +*** lcd4linux-0.10.1-RC2-orig/drv_LCD2USB.c 2007-02-25 13:39:10.000000000 +0100 +--- lcd4linux-0.10.1-RC2/drv_LCD2USB.c 2013-11-10 21:32:15.686677498 +0100 +*************** +*** 98,104 **** + static usb_dev_handle *lcd; + static int controllers = 0; + +- extern int usb_debug; + extern int got_signal; + + /****************************************/ +--- 98,103 ---- +*************** +*** 120,127 **** + if (device_id != NULL) + info("%s: scanning for device id: %s", Name, device_id); + +- usb_debug = 0; +- + usb_init(); + usb_find_busses(); + usb_find_devices(); +--- 119,124 ---- +diff -crB lcd4linux-0.10.1-RC2-orig/drv_picoLCD.c lcd4linux-0.10.1-RC2/drv_picoLCD.c +*** lcd4linux-0.10.1-RC2-orig/drv_picoLCD.c 2007-02-25 13:39:10.000000000 +0100 +--- lcd4linux-0.10.1-RC2/drv_picoLCD.c 2013-11-10 21:32:30.102120440 +0100 +*************** +*** 75,81 **** + static char *BufPtr; + + static usb_dev_handle *lcd; +- extern int usb_debug; + + + +--- 75,80 ---- +*************** +*** 97,104 **** + + info("%s: scanning for picoLCD...", Name); + +- usb_debug = 0; +- + usb_init(); + usb_find_busses(); + usb_find_devices(); +--- 96,101 ---- +diff -crB lcd4linux-0.10.1-RC2-orig/drv_Trefon.c lcd4linux-0.10.1-RC2/drv_Trefon.c +*** lcd4linux-0.10.1-RC2-orig/drv_Trefon.c 2007-02-25 13:39:10.000000000 +0100 +--- lcd4linux-0.10.1-RC2/drv_Trefon.c 2013-11-10 21:32:46.441489039 +0100 +*************** +*** 72,78 **** + static usb_dev_handle *lcd; + static int interface; + +- extern int usb_debug; + + + /****************************************/ +--- 72,77 ---- +*************** +*** 88,95 **** + + info("%s: scanning USB for TREFON LCD...", Name); + +- usb_debug = 0; +- + usb_init(); + usb_find_busses(); + usb_find_devices(); +--- 87,92 ---- +diff -crB lcd4linux-0.10.1-RC2-orig/drv_USBLCD.c lcd4linux-0.10.1-RC2/drv_USBLCD.c +*** lcd4linux-0.10.1-RC2-orig/drv_USBLCD.c 2007-02-25 13:39:10.000000000 +0100 +--- lcd4linux-0.10.1-RC2/drv_USBLCD.c 2013-11-10 21:33:01.508906792 +0100 +*************** +*** 86,93 **** + static usb_dev_handle *lcd; + static int interface; + +- extern int usb_debug; +- + #endif + + +--- 86,91 ---- +*************** +*** 107,114 **** + + info("%s: scanning for USBLCD...", Name); + +- usb_debug = 0; +- + usb_init(); + usb_find_busses(); + usb_find_devices(); +--- 105,110 ---- diff --git a/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-warnings.patch b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-warnings.patch new file mode 100644 index 000000000000..58791ee91ff7 --- /dev/null +++ b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-warnings.patch @@ -0,0 +1,64 @@ +Index: ./plugin_kvv.c +=================================================================== +--- ./plugin_kvv.c (revision 771) ++++ ./plugin_kvv.c (revision 797) +@@ -414,5 +414,5 @@ + + if (count > 0) { +- char *input, *cookie, *name, *value; ++ char *input, *cookie, *name = NULL, *value = NULL; + int input_len, cookie_len, name_len, value_len; + +Index: ./plugin_mpd.c +=================================================================== +--- ./plugin_mpd.c (revision 786) ++++ ./plugin_mpd.c (revision 797) +@@ -65,5 +65,10 @@ + int iport; + char *test; +- struct Pointer mpd; ++ ++ struct Pointer mpd = { ++ .conn = NULL, ++ .status = NULL, ++ .entity = NULL ++ }; + + if ((test = getenv("MPD_HOST"))) { +@@ -229,5 +234,6 @@ + #define _mpd_player_get_random 005 + +-void error_callback(MpdObj * mi, int errorid, char *msg, void *userdata) ++void error_callback( __attribute__ ((unused)) MpdObj * mi, int errorid, char *msg, __attribute__ ((unused)) ++ void *userdata) + { + printf("Error %i: '%s'\n", errorid, msg); +Index: ./drv_Image.c +=================================================================== +--- ./drv_Image.c (revision 771) ++++ ./drv_Image.c (revision 797) +@@ -115,5 +115,5 @@ + if (bitbuf == NULL) { + if ((bitbuf = malloc(xsize * ysize * sizeof(*bitbuf))) == NULL) { +- error("%s: malloc(%d) failed: %s", Name, (int) xsize * ysize * sizeof(*bitbuf), strerror(errno)); ++ error("%s: malloc() failed: %s", Name, strerror(errno)); + return -1; + } +@@ -122,5 +122,5 @@ + if (rowbuf == NULL) { + if ((rowbuf = malloc(3 * xsize * sizeof(*rowbuf))) == NULL) { +- error("Raster: malloc(%d) failed: %s", (int) 3 * xsize * sizeof(*rowbuf), strerror(errno)); ++ error("Raster: malloc() failed: %s", strerror(errno)); + return -1; + } +Index: ./plugin_i2c_sensors.c +=================================================================== +--- ./plugin_i2c_sensors.c (revision 771) ++++ ./plugin_i2c_sensors.c (revision 797) +@@ -297,5 +297,5 @@ + strcat(path_cfg, "/"); + } +- debug("using i2c sensors at %s (from %s)", path, cfg_source()); ++ debug("using i2c sensors at %s (from %s)", path_cfg, cfg_source()); + path = realloc(path, strlen(path_cfg) + 1); + strcpy(path, path_cfg); diff --git a/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2.initd b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2.initd new file mode 100644 index 000000000000..1135ea3d588b --- /dev/null +++ b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2.initd @@ -0,0 +1,22 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE=/var/run/lcd4linux.pid +DAEMON=/usr/bin/lcd4linux + +depend() { + use net +} + +start() { + ebegin "Starting lcd4linux" + start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} + eend $? "Failed to start lcd4linux. Did you remember to set up /etc/lcd4linux.conf?" +} + +stop() { + ebegin "Stopping lcd4linux" + start-stop-daemon --stop --quiet --oknodo --exec ${DAEMON} --pidfile ${PIDFILE} + eend $? +} diff --git a/app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r4.ebuild b/app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r4.ebuild new file mode 100644 index 000000000000..dd4dad81be11 --- /dev/null +++ b/app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r4.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +WANT_AUTOMAKE="1.9" +inherit eutils multilib autotools python-single-r1 + +MY_P=${P/_rc/-RC} + +DESCRIPTION="Shows system and ISDN information on an external display or in a X11 window" +HOMEPAGE="https://lcd4linux.bulix.org/" +SRC_URI="mirror://gentoo/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="mysql python iconv mpd" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# The following array holds the USE_EXPANDed keywords +IUSE_LCD_DEVICES=(beckmannegle bwct cfontz ncurses cwlinux + ea232 g15 hd44780 hd44780i2c lcd2usb + lcdlinux lcdterm ledmatrix lph7508 m50530 + mtxorb milfordbpk noritake null picolcd + png ppm routerboard serdisplib simplelcd + t6963 trefon usbhub usblcd wincor + X luise) + +# Iterate through the array and add the lcd_devices_* that we support +NUM_DEVICES=${#IUSE_LCD_DEVICES[@]} +index=0 +while [ "${index}" -lt "${NUM_DEVICES}" ] ; do + IUSE="${IUSE} lcd_devices_${IUSE_LCD_DEVICES[$index]}" + let "index = ${index} + 1" +done + +DEPEND=" + mysql? ( virtual/mysql ) + iconv? ( virtual/libiconv ) + mpd? ( media-libs/libmpd ) + + lcd_devices_bwct? ( =virtual/libusb-0* ) + lcd_devices_g15? ( =virtual/libusb-0* ) + lcd_devices_lcd2usb? ( =virtual/libusb-0* ) + lcd_devices_picolcd? ( =virtual/libusb-0* ) + lcd_devices_trefon? ( =virtual/libusb-0* ) + lcd_devices_usbhub? ( =virtual/libusb-0* ) + lcd_devices_usblcd? ( =virtual/libusb-0* ) + lcd_devices_luise? ( dev-libs/luise-bin ) + lcd_devices_ncurses? ( sys-libs/ncurses:0= ) + lcd_devices_noritake? ( media-libs/gd ) + lcd_devices_t6963? ( media-libs/gd ) + lcd_devices_png? ( media-libs/libpng:0= media-libs/gd ) + lcd_devices_X? ( x11-libs/libX11 media-libs/gd ) + lcd_devices_serdisplib? ( dev-libs/serdisplib media-libs/gd ) +" +RDEPEND="${DEPEND} + python? ( ${PYTHON_DEPS} ) +" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + elog "If you wish to compile only specific plugins, please use" + elog "the LCD4LINUX_PLUGINS environment variable. Plugins must be comma separated and can be either of:" + elog "apm cpuinfo diskstats dvb exec file i2c_sensors imon isdn kvv loadavg meminfo netdev pop3 ppp proc_stat seti statfs uname uptime wireless" + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + epatch "${FILESDIR}/${P}-warnings.patch" + epatch "${FILESDIR}/${P}-mpd.patch" + epatch "${FILESDIR}/${P}-nordtsc.patch" + epatch "${FILESDIR}/${P}-autoconf-2.65.patch" + epatch "${FILESDIR}/${P}-missing-header.patch" + epatch "${FILESDIR}/${P}-usbdebug.patch" + eautoreconf +} + +src_configure() { + # This array contains the driver names required by configure --with-drivers= + # The positions must be the same as the corresponding use_expand flags + local DEVICE_DRIVERS=(BeckmannEgle BWCT CrystalFontz Curses Cwlinux + EA232graphic G15 HD44780 HD44780-I2C LCD2USB + LCDLinux LCDTerm LEDMatrix LPH7508 M50530 + MatrixOrbital MilfordInstruments Noritake NULL picoLCD + PNG PPM RouterBoard serdisplib SimpleLCD + T6963 Trefon USBHUB USBLCD WincorNixdorf + X11 LUIse) + + local myconf myp + + # plugins + if [ -n "$LCD4LINUX_PLUGINS" ]; then + myp="$LCD4LINUX_PLUGINS" + else + myp="all,!xmms" + fi + use iconv || myp="${myp},!iconv" + use mpd || myp="${myp},!mpd" + use mysql || myp="${myp},!mysql" + use python || myp="${myp},!python" + elog "Active plugins: ${myp}" + + # Generate comma separated list of drivers + local COMMA_DRIVERS + local FIRST_DRIVER + local index=0 + local driver + + while [ "${index}" -lt "${NUM_DEVICES}" ] ; do + if use "lcd_devices_${IUSE_LCD_DEVICES[$index]}" ; then + driver=${DEVICE_DRIVERS[$index]} + if [ -z ${COMMA_DRIVERS} ] ; then + # First in the list + COMMA_DRIVERS="${driver}" + FIRST_DRIVER="${driver}" + else + # Second, third, ... include a comma at the front + COMMA_DRIVERS="${COMMA_DRIVERS},${driver}" + fi + fi + let "index = ${index} + 1" + done + + # activate at least one driver + if [ -z ${COMMA_DRIVERS} ] ; then + COMMA_DRIVERS="NULL" + fi + + # workaround the build failing because of b0rked settings + if use lcd_devices_hd44780 && use lcd_devices_hd44780i2c ; then + echo + ewarn "Disabling hd44780 LCD_DEVICE as hd44780i2c is set!" + echo + COMMA_DRIVERS="${COMMA_DRIVERS},!HD44780" + fi + + # avoid package brokenness + if use lcd_devices_X ; then + myconf="--x-libraries=/usr/$(get_libdir) --x-include=/usr/include" + else + myconf="--without-x" + fi + + econf \ + --sysconfdir=/etc/lcd4linux \ + --with-drivers="${COMMA_DRIVERS}" \ + --with-plugins="${myp}" \ + $(use_with python) \ + ${myconf} + + sed -i.orig -e 's/-L -lX11/ -lX11 /g' Makefile || die "sed fixup failed" +} + +src_install() { + default + + newinitd "${FILESDIR}/${P}.initd" ${PN} + + insinto /etc + insopts -o root -g root -m 0600 + newins lcd4linux.conf.sample lcd4linux.conf +} + +pkg_postinst() { + if use lcd_devices_lcdlinux; then + ewarn "To actually use the lcd-linux devices, you will need to install the lcd-linux kernel module." + ewarn "You can either do that yourself, see http://lcd-linux.sf.net or " + ewarn "checkout https://overlays.gentoo.org/dev/jokey/browser/trunk and emerge app-misc/lcd-linux" + fi +} diff --git a/app-misc/lcd4linux/metadata.xml b/app-misc/lcd4linux/metadata.xml new file mode 100644 index 000000000000..2d2a4720b153 --- /dev/null +++ b/app-misc/lcd4linux/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +<longdescription lang="en"> + LCD4Linux is a small program that grabs information from the kernel and some + subsystems and displays it on an external liquid crystal display. It is + fully configurable and supports many data sources, displays and plugins. +</longdescription> +<use> + <flag name="mpd">Add support for display of mpd controlled music + (<pkg>media-libs/libmpd</pkg>)</flag> +</use> +</pkgmetadata> |