Fix pkg download don't update ld.so.cache: add ldconfig exec (func shell_update)

This commit is contained in:
2026-09-11 18:01:43 +03:00
parent 42b7e6abd0
commit 1c3a598881
3 changed files with 86 additions and 2 deletions

View File

@ -2,10 +2,84 @@ hplip
=
https://sourceforge.net/projects/hplip/files/hplip/3.26.4/hplip-3.26.4.tar.gz
``` sh *** patch ***
sed -i '/#include "utils.h"/a\
\
/* Missing prototypes for internal HPLIP functions */\
extern void _releaseCupsInstance(void);\
extern int addCupsPrinter(const char *name, const char *device_uri,\
const char *location, const char *ppd_file,\
const char *model, const char *info);\
extern int delCupsPrinter(const char *name);\
extern int setDefaultCupsPrinter(const char *name);\
extern int controlCupsPrinter(const char *name, int op);' prnt/cupsext/cupsext.c
sed -i '/#include "orblitei.h"/a\
\
/* Forward declarations for orblite backend to fix implicit-function-declaration errors */\
extern SANE_Status orblite_init(SANE_Int *version_code, SANE_Auth_Callback authorize);\
extern void orblite_get_devices(SANE_Device ***device_list, SANE_Bool local_only);\
extern SANE_Status orblite_open(SANE_String_Const devicename, SANE_Handle *handle);\
extern void orblite_close(SANE_Handle handle);\
extern SANE_Status orblite_control_option(SANE_Handle handle, SANE_Int option, SANE_Action action, void *value, SANE_Int *info);\
extern SANE_Status orblite_get_parameters(SANE_Handle handle, SANE_Parameters *params);\
extern SANE_Status orblite_start(SANE_Handle handle);\
extern SANE_Status orblite_read(SANE_Handle handle, SANE_Byte *data, SANE_Int max_length, SANE_Int *length);\
extern void orblite_cancel(SANE_Handle handle);' scan/sane/hpaio.c
sed -i 's/int bb_is_paper_in_adf();/int bb_is_paper_in_adf(struct ledm_session *ps);/' scan/sane/ledmi.h
sed -i '/# include <stdlib.h>/a\
# include <unistd.h>' scan/sane/bb_ledm.c
sed -i '/#include <stdlib.h>/a\
#include <unistd.h>' scan/sane/http.c
sed -i '/#include <unistd.h>/a\
#include <sys/time.h>' scan/sane/sclpml.c
sed -i \
-e '/#include "io.h"/a\
#include <dlfcn.h>' \
-e 's/(SANE_Char\*\*)&SANE_rangeLeft/(const SANE_Char * const*)\&SANE_rangeLeft/g' \
-e 's/(SANE_Char\*\*)&SANE_rangeTop/(const SANE_Char * const*)\&SANE_rangeTop/g' \
-e 's/(SANE_Char\*\*)&SANE_rangeRight/(const SANE_Char * const*)\&SANE_rangeRight/g' \
-e 's/(SANE_Char\*\*)&SANE_rangeBottom/(const SANE_Char * const*)\&SANE_rangeBottom/g' \
-e 's/(SANE_Char\*\*)SANE_resolutions/(const SANE_Char * const*)SANE_resolutions/g' \
-e 's/(SANE_Char\*\*)SANE_modes/(const SANE_Char * const*)SANE_modes/g' \
-e 's/(SANE_Char\*\*)SANE_sources/(const SANE_Char * const*)SANE_sources/g' \
-e 's/(SANE_Char\*\*)SANE_paper_sizes/(const SANE_Char * const*)SANE_paper_sizes/g' \
-e 's/_DBG("Calling orblite bb_unload/DBG("Calling orblite bb_unload/' \
-e 's/bb_orblite_open(devicename, &g_handle)/bb_orblite_open(devicename, (void **)\&g_handle)/' \
scan/sane/orblite.c
sed -i '/^#include <Python.h>/a\
\
/* Python 2\/3 compatibility */\
#if PY_MAJOR_VERSION >= 3\
#define PyString_AsStringAndSize(obj, buf, len) PyBytes_AsStringAndSize((obj), (buf), (len))\
#define PyString_FromStringAndSize(str, len) PyBytes_FromStringAndSize((str), (len))\
#define PyInt_AS_LONG(obj) PyLong_AsLong(obj)\
#endif' pcard/pcardext/pcardext.c
sed -i '/^void initpcardext/,/^}$/c\
PyMODINIT_FUNC PyInit_pcardext(void)\
{\
static struct PyModuleDef moduledef = {\
PyModuleDef_HEAD_INIT, "pcardext", pcardext_documentation, -1, pcardext_methods,\
};\
PyObject *mod = PyModule_Create(\&moduledef);\
if (mod == NULL)\
return NULL;\
return mod;\
}' pcard/pcardext/pcardext.c
sed -i 's/static column = 0 ;/static int column = 0 ;/' prnt/hpps/pserror.c
```
``` sh *** build ***
./configure --prefix=/pkg/gnu/hplip --disable-network-build
./configure --prefix=$pkgpath --disable-network-build --disable-pcard-build
make -j$(nproc)
make install
```
``` cfg *** build deps ***
libusb
sane-backends
cups
```
sane-backends - scan

View File

@ -0,0 +1,9 @@
sane-backends 1.4.0
=
https://gitlab.com/-/project/429008/uploads/843c156420e211859e974f78f64c3ea3/sane-backends-1.4.0.tar.gz
``` sh *** build ***
./configure --prefix=$pkgpath
make -j$(nproc)
make install
```

View File

@ -6,7 +6,7 @@ use std::cell::RefCell;
use super::get_aeropkg_base;
use crate::utils::parser::{self, env::get_install_env, repoinfo, pkginfo, env::get_custom_env};
use crate::utils::shell;
use crate::utils::shell::{self, shell_update};
use crate::commands::link::link;
use crate::commands::run::config::config;
@ -139,6 +139,7 @@ pub fn download(repo: &String, pkgname: &String, force: bool, recursive: bool) {
} else {
link(repo, pkgname)
}
shell_update();
}
fn check_build_dependency(repo: &String, pkg_md_path: &Path, force: bool, recursive: bool) {